Skip to content

Commit d195f28

Browse files
committed
Auto merge of #5804 - dwijnand:hg-discover, r=alexcrichton
Fix HgRepo::discover Replace the duplicate .cwd call with an invocation taken from https://stackoverflow.com/a/3138925/463761 Match the semantics of the other vcs calls, which is invoke from 'cwd' targeting 'path'. Looks a little confusing because hg takes a '--cwd' argument.
2 parents b5a1dbd + 36cd1c3 commit d195f28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cargo/util/vcs.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ impl HgRepo {
2828
pub fn discover(path: &Path, cwd: &Path) -> CargoResult<HgRepo> {
2929
process("hg")
3030
.cwd(cwd)
31+
.arg("--cwd")
32+
.arg(path)
3133
.arg("root")
32-
.cwd(path)
3334
.exec_with_output()?;
3435
Ok(HgRepo)
3536
}

0 commit comments

Comments
 (0)