mirror of
https://github.com/openai/codex.git
synced 2026-05-18 02:02:30 +00:00
codex: restore legacy shell workdir resolution
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -80,6 +80,18 @@ where
|
||||
parse_arguments(arguments)
|
||||
}
|
||||
|
||||
fn resolve_workdir_base_path(
|
||||
arguments: &str,
|
||||
cwd: &AbsolutePathBuf,
|
||||
) -> Result<AbsolutePathBuf, FunctionCallError> {
|
||||
let target_args: EnvironmentTargetArgs = parse_arguments(arguments)?;
|
||||
Ok(target_args
|
||||
.workdir
|
||||
.as_deref()
|
||||
.filter(|workdir| !workdir.is_empty())
|
||||
.map_or_else(|| cwd.clone(), |workdir| cwd.join(workdir)))
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct EnvironmentTargetArgs {
|
||||
#[serde(default)]
|
||||
|
||||
Reference in New Issue
Block a user