diff --git a/src/cargo/util/vcs.rs b/src/cargo/util/vcs.rs index 1eb447a59..53ffbba77 100644 --- a/src/cargo/util/vcs.rs +++ b/src/cargo/util/vcs.rs @@ -28,8 +28,9 @@ impl HgRepo { pub fn discover(path: &Path, cwd: &Path) -> CargoResult { process("hg") .cwd(cwd) + .arg("--cwd") + .arg(path) .arg("root") - .cwd(path) .exec_with_output()?; Ok(HgRepo) }