From 40140ee9dddf53cf0aeda6f54db664ee8c67ff52 Mon Sep 17 00:00:00 2001 From: viyatb-oai Date: Sat, 9 May 2026 20:44:03 +0000 Subject: [PATCH] test(windows-sandbox): avoid nested cmd path quotes Co-authored-by: Codex --- .../windows-sandbox-rs/src/unified_exec/tests.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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 86e84fb0b8..549acc6145 100644 --- a/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs +++ b/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs @@ -229,13 +229,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { vec![ "C:\\Windows\\System32\\cmd.exe".to_string(), "/c".to_string(), - format!( - "cd & dir & dir \"{}\" & type \"{public_rel}\" 2>&1", - fixture_dir - .file_name() - .expect("fixture name") - .to_string_lossy(), - ), + format!("type {public_rel} 2>&1"), ], cwd.as_path(), HashMap::new(), @@ -268,7 +262,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { vec![ "C:\\Windows\\System32\\cmd.exe".to_string(), "/c".to_string(), - format!("type \"{public_rel}\" 2>&1"), + format!("type {public_rel} 2>&1"), ], cwd.as_path(), HashMap::new(), @@ -294,7 +288,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { vec![ "C:\\Windows\\System32\\cmd.exe".to_string(), "/c".to_string(), - format!("type \"{secret_rel}\" 2>NUL"), + format!("type {secret_rel} 2>NUL"), ], cwd.as_path(), HashMap::new(),