From d3138cb94d717ea7c3b5211d7235eb8276724021 Mon Sep 17 00:00:00 2001 From: Abhinav Vedmala Date: Mon, 8 Jun 2026 17:57:17 -0700 Subject: [PATCH] Use PowerShell directly in Windows sandbox test --- codex-rs/core/tests/suite/windows_sandbox.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/tests/suite/windows_sandbox.rs b/codex-rs/core/tests/suite/windows_sandbox.rs index d09496e539..7cf96e7fbf 100644 --- a/codex-rs/core/tests/suite/windows_sandbox.rs +++ b/codex-rs/core/tests/suite/windows_sandbox.rs @@ -403,7 +403,8 @@ async fn windows_unified_exec_managed_network_enforces_deny_read() -> anyhow::Re let call_id = "windows-unified-exec-managed-network-deny-read"; let command = format!( - r#"cmd.exe /D /C "(type "{}" 1>NUL 2>NUL && echo SECRET-READ || echo SECRET-DENIED) & type "{}""#, + "if (Get-Content -LiteralPath '{}' -ErrorAction SilentlyContinue) {{ \ + 'SECRET-READ' }} else {{ 'SECRET-DENIED' }}; Get-Content -LiteralPath '{}'", secret_path.display(), public_path.display() );