From e3899091e5a437b697a984f66cd113c73dd78596 Mon Sep 17 00:00:00 2001 From: Paulo Aboim Pinto Date: Wed, 27 May 2026 18:18:19 +0200 Subject: [PATCH] fix(tui): use raw args for cmd payloads --- crates/tui/src/shell_dispatcher.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/tui/src/shell_dispatcher.rs b/crates/tui/src/shell_dispatcher.rs index 72c81c39..b4af5220 100644 --- a/crates/tui/src/shell_dispatcher.rs +++ b/crates/tui/src/shell_dispatcher.rs @@ -17,6 +17,8 @@ use std::fs::OpenOptions; use std::io::Write; +#[cfg(windows)] +use std::os::windows::process::CommandExt; use std::path::Path; use std::process::Command; use std::sync::Mutex; @@ -181,6 +183,16 @@ impl ShellDispatcher { cmd.arg(self.kind.command_flag()); cmd.arg("-Command"); cmd.arg(shell_command); + } else if matches!(self.kind, ShellKind::Cmd) { + cmd.arg(self.kind.command_flag()); + #[cfg(windows)] + { + cmd.raw_arg(shell_command); + } + #[cfg(not(windows))] + { + cmd.arg(shell_command); + } } else { cmd.arg(self.kind.command_flag()); cmd.arg(shell_command);