mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
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.
This commit is contained in:
parent
191bfbfaf2
commit
36cd1c3219
@ -28,8 +28,9 @@ impl HgRepo {
|
|||||||
pub fn discover(path: &Path, cwd: &Path) -> CargoResult<HgRepo> {
|
pub fn discover(path: &Path, cwd: &Path) -> CargoResult<HgRepo> {
|
||||||
process("hg")
|
process("hg")
|
||||||
.cwd(cwd)
|
.cwd(cwd)
|
||||||
|
.arg("--cwd")
|
||||||
|
.arg(path)
|
||||||
.arg("root")
|
.arg("root")
|
||||||
.cwd(path)
|
|
||||||
.exec_with_output()?;
|
.exec_with_output()?;
|
||||||
Ok(HgRepo)
|
Ok(HgRepo)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user