From 14f95db57b269a06c8b56b62a280ae54c7bf819b Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Thu, 2 Apr 2026 23:54:02 -0700 Subject: [PATCH] fix: use COMSPEC in Windows unicode shell test (#16665) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Why Windows Bazel shell tests launch PowerShell with a curated environment, so `PATHEXT` may be absent. The existing `unicode_output` test invokes bare `cmd`, which can fail before the test exercises UTF-8 child-process output. ## What - Use `$env:COMSPEC /c echo naïve_café` in the Windows branch of `unicode_output`. - Preserve the external child-process path instead of switching the test to a PowerShell builtin. ## Verification - `cargo test -p codex-core unicode_output` --- codex-rs/core/tests/suite/shell_command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/core/tests/suite/shell_command.rs b/codex-rs/core/tests/suite/shell_command.rs index ad02a645e..ce0f47698 100644 --- a/codex-rs/core/tests/suite/shell_command.rs +++ b/codex-rs/core/tests/suite/shell_command.rs @@ -268,7 +268,7 @@ async fn unicode_output(login: bool) -> anyhow::Result<()> { // config is actually being set correctly. let call_id = "unicode_output"; let command = if cfg!(windows) { - "cmd /c echo naïve_café" + "& $env:COMSPEC /c echo naïve_café" } else { "echo \"naïve_café\"" };