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.
2 parents c4b8917 + 11a8e51 commit b31bdc1Copy full SHA for b31bdc1
src/tools/rust-analyzer/crates/project-model/src/sysroot.rs
@@ -192,8 +192,12 @@ impl Sysroot {
192
193
cmd.arg("which");
194
cmd.arg(tool.name());
195
- (|| Some(Utf8PathBuf::from(String::from_utf8(cmd.output().ok()?.stdout).ok()?)))()
196
- .unwrap_or_else(|| Utf8PathBuf::from(tool.name()))
+ (|| {
+ Some(Utf8PathBuf::from(
197
+ String::from_utf8(cmd.output().ok()?.stdout).ok()?.trim_end(),
198
+ ))
199
+ })()
200
+ .unwrap_or_else(|| Utf8PathBuf::from(tool.name()))
201
}
202
_ => tool.path(),
203
0 commit comments