Skip to content

Commit 5a71eb8

Browse files
committed
More specific error if rustc --print sysroot fails
1 parent 5b703bd commit 5a71eb8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/ra_project_model/src/sysroot.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ fn try_find_src_path(cargo_toml: &Path) -> Result<PathBuf> {
9999
let rustc_output = Command::new("rustc")
100100
.current_dir(cargo_toml.parent().unwrap())
101101
.args(&["--print", "sysroot"])
102-
.output()?;
102+
.output()
103+
.map_err(|e| format!("rustc --print sysroot failed: {}", e))?;
103104
if !rustc_output.status.success() {
104105
Err("failed to locate sysroot")?;
105106
}

0 commit comments

Comments
 (0)