From edd9d1efc83c41b3d38dc8a0f5b35ab4dc6f173f Mon Sep 17 00:00:00 2001 From: starr-openai Date: Fri, 29 May 2026 00:46:14 -0700 Subject: [PATCH] Fix hook command runner windows shell 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 8f6acbc4cc..9ed3c5ac15 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!(" String { if cfg!(windows) { format!( - "set /p input= & &2 & exit /B {exit_code}" + "powershell -NoLogo -NoProfile -Command \"$hookInput = [Console]::In.ReadToEnd(); [Console]::Out.Write($hookInput); [Console]::Error.Write('stderr'); exit {exit_code}\"" ) } else { format!("cat; printf stderr >&2; exit {exit_code}")