diff --git a/eden/scm/lib/commandserver/src/ipc.rs b/eden/scm/lib/commandserver/src/ipc.rs index 59232d951a129..9ec34d98c3110 100644 --- a/eden/scm/lib/commandserver/src/ipc.rs +++ b/eden/scm/lib/commandserver/src/ipc.rs @@ -59,8 +59,15 @@ impl Client { } else { Command::new("/bin/sh") }; - cmd.arg(if cfg!(windows) { "/c" } else { "-c" }) - .arg(command); + #[cfg(windows)] + { + use std::os::windows::process::CommandExt; + cmd.arg("/c").raw_arg(command); + } + #[cfg(not(windows))] + { + cmd.arg("-c").arg(command); + } cmd } else { Command::new(command)