From b15c918836ae114f9706e24532465e864f5506c4 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Fri, 3 Apr 2026 00:32:08 -0700 Subject: [PATCH] fix: use cmd.exe in Windows unicode shell test (#16668) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Why This is a follow-up to #16665. The Windows `unicode_output` test should still exercise a child process so it verifies PowerShell's UTF-8 output configuration, but `$env:COMSPEC` depends on that environment variable surviving the curated Bazel test environment. Using `cmd.exe` keeps the child-process coverage while avoiding both bare `cmd` + `PATHEXT` lookup and `$env:COMSPEC` env passthrough assumptions. ## What - Run `cmd.exe /c echo naïve_café` in the Windows branch of `unicode_output`. ## 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 ce0f47698..705a06a4c 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) { - "& $env:COMSPEC /c echo naïve_café" + "cmd.exe /c echo naïve_café" } else { "echo \"naïve_café\"" };