aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-24 21:03:33 +0100
committerGitHub <[email protected]>2020-04-24 21:03:33 +0100
commite55b1833ffe896179d9d97ebec9caaf9256e0616 (patch)
treec7e9499d70acb6d38a84f386a7a64511246e39fa
parentbdd22eb8bd35dc4d5ff1bc8e00eb44bc48d14dcd (diff)
parent6c400b3e334d280af78de4ce8a8334e593e26193 (diff)
Merge #4127
4127: More helpful error message if toolchain is not in PATH r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r--crates/ra_project_model/src/cargo_workspace.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs
index 84008b2e3..0613310f1 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/ra_project_model/src/cargo_workspace.rs
@@ -141,6 +141,11 @@ impl CargoWorkspace {
141 cargo_toml: &Path, 141 cargo_toml: &Path,
142 cargo_features: &CargoConfig, 142 cargo_features: &CargoConfig,
143 ) -> Result<CargoWorkspace> { 143 ) -> Result<CargoWorkspace> {
144 let _ = Command::new(cargo_binary())
145 .arg("--version")
146 .status()
147 .context("failed to run `cargo --version`, is `cargo` in PATH?")?;
148
144 let mut meta = MetadataCommand::new(); 149 let mut meta = MetadataCommand::new();
145 meta.manifest_path(cargo_toml); 150 meta.manifest_path(cargo_toml);
146 if cargo_features.all_features { 151 if cargo_features.all_features {