mirror of
https://github.com/openai/codex.git
synced 2026-04-29 00:55:38 +00:00
Use AbsolutePathBuf for cwd state (#15710)
Migrate `cwd` and related session/config state to `AbsolutePathBuf` so downstream consumers consistently see absolute working directories. Add test-only `.abs()` helpers for `Path`, `PathBuf`, and `TempDir`, and update branch-local tests to use them instead of `AbsolutePathBuf::try_from(...)`. For the remaining TUI/app-server snapshot coverage that renders absolute cwd values, keep the snapshots unchanged and skip the Windows-only cases where the platform-specific absolute path layout differs.
This commit is contained in:
@@ -260,7 +260,7 @@ async fn run_command_under_sandbox(
|
||||
PathBuf::from("/usr/bin/sandbox-exec"),
|
||||
args,
|
||||
/*arg0*/ None,
|
||||
cwd,
|
||||
cwd.to_path_buf(),
|
||||
network_policy,
|
||||
env,
|
||||
|env_map| {
|
||||
@@ -293,7 +293,7 @@ async fn run_command_under_sandbox(
|
||||
codex_linux_sandbox_exe,
|
||||
args,
|
||||
Some("codex-linux-sandbox"),
|
||||
cwd,
|
||||
cwd.to_path_buf(),
|
||||
network_policy,
|
||||
env,
|
||||
|env_map| {
|
||||
|
||||
Reference in New Issue
Block a user