Move back onto main subprocess

This commit is contained in:
Jonathan Turner
2019-06-18 14:04:34 +12:00
parent 35ef78df67
commit a764a64161
4 changed files with 17 additions and 9 deletions

View File

@ -184,6 +184,7 @@ impl ExternalCommand {
}
let mut process;
#[cfg(windows)]
{
process = Exec::shell(&self.name);
@ -267,6 +268,7 @@ impl ExternalCommand {
new_arg_string.push_str(&arg);
}
}
process = Exec::shell(new_arg_string);
}
process = process.cwd(context.env.lock().unwrap().front().unwrap().path());

View File

@ -383,7 +383,16 @@ impl Leaf {
fn as_external_arg(&self) -> String {
match self {
Leaf::String(s) => format!("\"{}\"", s),
Leaf::String(s) => {
#[cfg(windows)]
{
format!("{}", s)
}
#[cfg(not(windows))]
{
format!("\"{}\"", s)
}
}
Leaf::Bare(path) => format!("{}", path.to_string()),
Leaf::Boolean(b) => format!("{}", b),
Leaf::Int(i) => format!("{}", i),