We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
rustc
1 parent 05662b3 commit 7aab3e2Copy full SHA for 7aab3e2
.changes/cli-rustc-not-found-msg.md
@@ -0,0 +1,5 @@
1
+---
2
+"cli.rs": "patch"
3
4
+
5
+Improve the error message when `rustc` couldn't be found.
tooling/cli/src/interface/rust.rs
@@ -827,7 +827,10 @@ impl RustAppSettings {
827
.target()
828
.map(|t| t.to_string())
829
.unwrap_or_else(|| {
830
- let output = Command::new("rustc").args(["-vV"]).output().unwrap();
+ let output = Command::new("rustc")
831
+ .args(["-vV"])
832
+ .output()
833
+ .expect("\"rustc\" could not be found, did you install Rust?");
834
let stdout = String::from_utf8_lossy(&output.stdout);
835
stdout
836
.split('\n')
0 commit comments