Skip to content

Commit e55b183

Browse files
bors[bot]matklad
andauthored
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]>
2 parents bdd22eb + 6c400b3 commit e55b183

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/ra_project_model/src/cargo_workspace.rs

+5
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ impl CargoWorkspace {
141141
cargo_toml: &Path,
142142
cargo_features: &CargoConfig,
143143
) -> 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+
144149
let mut meta = MetadataCommand::new();
145150
meta.manifest_path(cargo_toml);
146151
if cargo_features.all_features {

0 commit comments

Comments
 (0)