Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Keep approval test targets in the temporary home (#33185)

Adam Perry @ OpenAIbe0e0d791a1b
diff --git a/codex-rs/core/tests/suite/approvals.rs b/codex-rs/core/tests/suite/approvals.rs
index fdbc3aa0ff..21da8ca444 100644
--- a/codex-rs/core/tests/suite/approvals.rs
+++ b/codex-rs/core/tests/suite/approvals.rs
@@ -53,7 +53,6 @@ use pretty_assertions::assert_eq;
use regex_lite::Regex;
use serde_json::Value;
use serde_json::json;
-use std::env;
use std::fs;
#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;
@@ -83,9 +82,7 @@ impl TargetPath {
(path, name.to_string())
}
TargetPath::OutsideWorkspace(name) => {
- let path = env::current_dir()
- .expect("current dir should be available")
- .join(name);
+ let path = test.home.path().join(name);
(path.clone(), path.display().to_string())
}
}