From b9a4ef18c8b2ebadfad63e67137370cf3347a209 Mon Sep 17 00:00:00 2001 From: Patrick Reisert Date: Fri, 10 Jun 2016 15:07:55 +0200 Subject: [PATCH] Fix `cargo doc --open` on Windows This fixes #2446. Note that I have not built cargo with this change, but I have tested the functionality in isolation (on Windows 10). As to the issue itself, I don't know why the previous version didn't work, but `start` is redundant when `cmd /C` is used. --- src/cargo/ops/cargo_doc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cargo/ops/cargo_doc.rs b/src/cargo/ops/cargo_doc.rs index 5b271567eee..43a6621d750 100644 --- a/src/cargo/ops/cargo_doc.rs +++ b/src/cargo/ops/cargo_doc.rs @@ -99,9 +99,9 @@ fn open_docs(path: &Path) -> Result<&'static str, Vec<&'static str>> { #[cfg(target_os = "windows")] fn open_docs(path: &Path) -> Result<&'static str, Vec<&'static str>> { - match Command::new("cmd").arg("/C").arg("start").arg("").arg(path).status() { - Ok(_) => return Ok("cmd /C start"), - Err(_) => return Err(vec!["cmd /C start"]) + match Command::new("cmd").arg("/C").arg(path).status() { + Ok(_) => return Ok("cmd /C"), + Err(_) => return Err(vec!["cmd /C"]) }; }