Skip to content

Commit

Permalink
windows: start is a cmd command, not an executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Schneider committed Jul 8, 2015
1 parent 8db67f5 commit 210ec6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn that(path: &str) -> io::Result<ExitStatus> {

#[cfg(target_os = "windows")]
pub fn that(path: &str) -> io::Result<ExitStatus> {
match Command::new("start").arg(path).spawn() {
match Command::new("cmd").arg("/C").arg("start").arg(path).spawn() {
Ok(mut child) => child.wait(),
Err(err) => Err(err),
}
Expand All @@ -50,4 +50,4 @@ pub fn that(path: &str) -> io::Result<ExitStatus> {
Ok(mut child) => child.wait(),
Err(err) => Err(err),
}
}
}

0 comments on commit 210ec6e

Please sign in to comment.