From be0e0d791a1b735de307f013037b091d24f57484 Mon Sep 17 00:00:00 2001 From: "Adam Perry @ OpenAI" Date: Tue, 14 Jul 2026 22:26:50 +0000 Subject: [PATCH] Keep approval test targets in the temporary home (#33185) ## What changed Resolve approval test targets outside the workspace relative to the test's temporary home instead of the process working directory. This keeps the targets outside the test workspace while containing them in the test environment. GitOrigin-RevId: 871e840d658468c56d603afc10cc226f918bba5a --- codex-rs/core/tests/suite/approvals.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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()) } }