Skip to content

Commit

Permalink
Fix is_rustc for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jun 8, 2023
1 parent 47288fe commit 730696a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/src/rustup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn toolchain_path(path: &Path) -> Result<PathBuf> {
}

pub fn is_rustc<T: AsRef<OsStr> + ?Sized>(arg: &T) -> bool {
Path::new(arg).file_name() == Some(OsStr::new("rustc"))
Path::new(arg).file_stem() == Some(OsStr::new("rustc"))
}

#[test]
Expand Down

0 comments on commit 730696a

Please sign in to comment.