Skip to content

Commit 29f5e7e

Browse files
bors[bot]matklad
andauthored
Merge #3084
3084: More specific error if `rustc --print sysroot` fails r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
2 parents 5b703bd + 5a71eb8 commit 29f5e7e

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)