mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 01:05:39 +03:00
Merge #4127
4127: More helpful error message if toolchain is not in PATH r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
@@ -141,6 +141,11 @@ pub fn from_cargo_metadata(
|
||||
cargo_toml: &Path,
|
||||
cargo_features: &CargoConfig,
|
||||
) -> Result<CargoWorkspace> {
|
||||
let _ = Command::new(cargo_binary())
|
||||
.arg("--version")
|
||||
.status()
|
||||
.context("failed to run `cargo --version`, is `cargo` in PATH?")?;
|
||||
|
||||
let mut meta = MetadataCommand::new();
|
||||
meta.manifest_path(cargo_toml);
|
||||
if cargo_features.all_features {
|
||||
|
||||
Reference in New Issue
Block a user