Skip to content

Commit 7aab3e2

Browse files
authored
fix(cli.rs): improve rustc not found error msg (#6021)
1 parent 05662b3 commit 7aab3e2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,10 @@ impl RustAppSettings {
827827
.target()
828828
.map(|t| t.to_string())
829829
.unwrap_or_else(|| {
830-
let output = Command::new("rustc").args(["-vV"]).output().unwrap();
830+
let output = Command::new("rustc")
831+
.args(["-vV"])
832+
.output()
833+
.expect("\"rustc\" could not be found, did you install Rust?");
831834
let stdout = String::from_utf8_lossy(&output.stdout);
832835
stdout
833836
.split('\n')

0 commit comments

Comments
 (0)