From 62154c0f05314c21533dbfe63bf4f5c5ebf2138f Mon Sep 17 00:00:00 2001 From: starr-openai Date: Fri, 29 May 2026 00:17:11 -0700 Subject: [PATCH] Fix hook command runner windows output tests --- codex-rs/hooks/src/engine/command_runner.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}")