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.
1 parent 2968c39 commit 862da08Copy full SHA for 862da08
collector/src/toolchain.rs
@@ -598,7 +598,14 @@ fn get_lib_dir_from_rustc(rustc: &Path) -> anyhow::Result<PathBuf> {
598
);
599
}
600
let sysroot_path = String::from_utf8_lossy(&output.stdout);
601
- Ok(Path::new(sysroot_path.as_ref().trim()).join("lib"))
+ let lib_dir = Path::new(sysroot_path.as_ref().trim()).join("lib");
602
+ if !lib_dir.exists() {
603
+ anyhow::bail!(
604
+ "rustc returned non-existent sysroot: `{}`",
605
+ lib_dir.display()
606
+ );
607
+ }
608
+ Ok(lib_dir)
609
610
611
#[cfg(test)]
0 commit comments