Merge #5816
5816: Better error if Cargo is not in Path
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
1d19084317
@ -151,11 +151,18 @@ pub fn load(
|
||||
ProjectWorkspace::Json { project }
|
||||
}
|
||||
ProjectManifest::CargoToml(cargo_toml) => {
|
||||
let cargo_version = utf8_stdout({
|
||||
let mut cmd = Command::new(toolchain::cargo());
|
||||
cmd.arg("--version");
|
||||
cmd
|
||||
})?;
|
||||
|
||||
let cargo = CargoWorkspace::from_cargo_metadata(&cargo_toml, cargo_config)
|
||||
.with_context(|| {
|
||||
format!(
|
||||
"Failed to read Cargo metadata from Cargo.toml file {}",
|
||||
cargo_toml.display()
|
||||
"Failed to read Cargo metadata from Cargo.toml file {}, {}",
|
||||
cargo_toml.display(),
|
||||
cargo_version
|
||||
)
|
||||
})?;
|
||||
let sysroot = if with_sysroot {
|
||||
|
Loading…
Reference in New Issue
Block a user