diff --git a/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs b/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs index 0f1a748422..5a298b77c6 100644 --- a/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs +++ b/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs @@ -189,6 +189,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { let fixture_dir = cwd.join(format!("legacy-non-tty-deny-read-fixture-{fixture_id}")); let _ = fs::remove_dir_all(&fixture_dir); let secret_path = fixture_dir.join("secret.env"); + let public_path = fixture_dir.join("public.txt"); fs::create_dir_all(&fixture_dir).expect("create deny-read fixture"); for (label, command) in [ @@ -228,7 +229,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { vec![ "C:\\Windows\\System32\\cmd.exe".to_string(), "/c".to_string(), - "type \"public.txt\" 2>&1".to_string(), + format!("type \"{}\" 2>&1", public_path.display()), ], fixture_dir.as_path(), HashMap::new(), @@ -261,7 +262,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { vec![ "C:\\Windows\\System32\\cmd.exe".to_string(), "/c".to_string(), - "type \"public.txt\" 2>&1".to_string(), + format!("type \"{}\" 2>&1", public_path.display()), ], fixture_dir.as_path(), HashMap::new(), @@ -287,7 +288,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { vec![ "C:\\Windows\\System32\\cmd.exe".to_string(), "/c".to_string(), - "type \"secret.env\" 2>NUL".to_string(), + format!("type \"{}\" 2>NUL", secret_path.display()), ], fixture_dir.as_path(), HashMap::new(),