diff --git a/codex-rs/hooks/src/engine/command_runner.rs b/codex-rs/hooks/src/engine/command_runner.rs index 4a66612a5e..8f6acbc4cc 100644 --- a/codex-rs/hooks/src/engine/command_runner.rs +++ b/codex-rs/hooks/src/engine/command_runner.rs @@ -443,7 +443,7 @@ mod tests { fn print_command(output: &str) -> String { if cfg!(windows) { - format!("echo|set /p={output}") + format!(" String { if cfg!(windows) { format!( - "set /p input= & echo|set /p=%input% & echo|set /p=stderr 1>&2 & exit /B {exit_code}" + "set /p input= & &2 & exit /B {exit_code}" ) } else { format!("cat; printf stderr >&2; exit {exit_code}")