From d106773178d396e5d2223f347a4bfcc8760e1c9d Mon Sep 17 00:00:00 2001 From: Hunter Bown Date: Wed, 20 May 2026 23:57:38 +0800 Subject: [PATCH] test(shell): stabilize Windows background helper --- crates/tui/src/tools/shell/tests.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/tui/src/tools/shell/tests.rs b/crates/tui/src/tools/shell/tests.rs index a9bbf2a0..d3e80d9c 100644 --- a/crates/tui/src/tools/shell/tests.rs +++ b/crates/tui/src/tools/shell/tests.rs @@ -24,10 +24,7 @@ fn sleep_command(seconds: u64) -> String { #[cfg(windows)] { let ping_count = seconds.saturating_add(1); - let ps_path = r#"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe"#; - format!( - "\"{ps_path}\" -NoProfile -Command \"Start-Sleep -Seconds {seconds}\" || ping 127.0.0.1 -n {ping_count} > NUL" - ) + format!("ping 127.0.0.1 -n {ping_count} > NUL") } #[cfg(not(windows))] { @@ -39,10 +36,7 @@ fn sleep_then_echo_command(seconds: u64, message: &str) -> String { #[cfg(windows)] { let ping_count = seconds.saturating_add(1); - let ps_path = r#"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe"#; - format!( - "\"{ps_path}\" -NoProfile -Command \"Start-Sleep -Seconds {seconds}; Write-Output {message}\" || (ping 127.0.0.1 -n {ping_count} > NUL && echo {message})" - ) + format!("ping 127.0.0.1 -n {ping_count} > NUL && echo {message}") } #[cfg(not(windows))] {