]> git.lizzy.rs Git - rust.git/commit
Always quote program name in Command::spawn on Windows
authorOliver Middleton <olliemail27@gmail.com>
Sun, 4 Jun 2017 20:47:24 +0000 (21:47 +0100)
committerOliver Middleton <olliemail27@gmail.com>
Sun, 4 Jun 2017 20:47:24 +0000 (21:47 +0100)
commit7afcf51fe4f635ff4e864ee13085397b41880fa6
treef8498827dc96cd05f6c448a23d404469f64f0a04
parent0da9721ab49d80bf74208e94a891b12c4a248507
Always quote program name in Command::spawn on Windows

`CreateProcess` will interpret args as part of the binary name if it
doesn't find the binary using just the unquoted name. For example if
`foo.exe` doesn't exist, `Command::new("foo").arg("bar").spawn()` will
try to launch `foo bar.exe` which is clearly not desired.
src/libstd/sys/windows/process.rs