mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
Fix marketplace config test and argument lint
This commit is contained in:
@@ -10,7 +10,13 @@ pub fn create_shell_command_sse_response(
|
||||
) -> anyhow::Result<String> {
|
||||
// The `arguments` for the `shell_command` tool is a serialized JSON object.
|
||||
let command_str = shlex::try_join(command.iter().map(String::as_str))?;
|
||||
create_shell_command_sse_response_from_command(&command_str, workdir, timeout_ms, call_id, None)
|
||||
create_shell_command_sse_response_from_command(
|
||||
&command_str,
|
||||
workdir,
|
||||
timeout_ms,
|
||||
call_id,
|
||||
/*login*/ None,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn create_shell_command_sse_response_from_command(
|
||||
|
||||
@@ -276,12 +276,18 @@ mod tests {
|
||||
|
||||
let config = fs::read_to_string(codex_home.path().join(codex_config::CONFIG_TOML_FILE))?;
|
||||
let config: toml::Value = toml::from_str(&config)?;
|
||||
let marketplace = config
|
||||
.get("marketplaces")
|
||||
.and_then(toml::Value::as_table)
|
||||
.and_then(|marketplaces| marketplaces.get("debug"))
|
||||
.and_then(toml::Value::as_table)
|
||||
.expect("debug marketplace should be present in config");
|
||||
assert_eq!(
|
||||
config["marketplaces"]["debug"]["source_type"].as_str(),
|
||||
marketplace.get("source_type").and_then(toml::Value::as_str),
|
||||
Some("local")
|
||||
);
|
||||
assert_eq!(
|
||||
config["marketplaces"]["debug"]["source"].as_str(),
|
||||
marketplace.get("source").and_then(toml::Value::as_str),
|
||||
Some(expected_source.as_str())
|
||||
);
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user