mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
More helpful error message if toolchain is not in PATH
This commit is contained in:
parent
5d97667f8d
commit
6c400b3e33
1 changed files with 5 additions and 0 deletions
|
@ -141,6 +141,11 @@ impl CargoWorkspace {
|
|||
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 {
|
||||
|
|
Loading…
Reference in a new issue