about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2023-08-09 14:09:37 +0200
committerLukas Wirth <lukastw97@gmail.com>2023-08-09 14:09:37 +0200
commit18b24f60d0423a7b88978ca08bcfca4a905583d1 (patch)
tree3d1c69b4b9a772c79e6abd888604c3d9e6766465
parentcba39f8553e751e6fb4626653153b1e980472565 (diff)
downloadrust-18b24f60d0423a7b88978ca08bcfca4a905583d1.tar.gz
rust-18b24f60d0423a7b88978ca08bcfca4a905583d1.zip
More error context when failing to invoke the rust toolchain
-rw-r--r--crates/project-model/src/workspace.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/project-model/src/workspace.rs b/crates/project-model/src/workspace.rs
index f51ea7eeb22..13463e9f72e 100644
--- a/crates/project-model/src/workspace.rs
+++ b/crates/project-model/src/workspace.rs
@@ -167,7 +167,8 @@ impl ProjectWorkspace {
                 cmd.envs(&config.extra_env);
                 cmd.arg("--version").current_dir(current_dir);
                 cmd
-            })?;
+            })
+            .with_context(|| format!("Failed to query rust toolchain version at {current_dir}, is your toolchain setup correctly?"))?;
             anyhow::Ok(
                 cargo_version
                     .get(prefix.len()..)