make the find_miri returned path actually exist

This commit is contained in:
Ralf Jung 2022-07-21 10:36:55 -04:00
parent 0a9feb3c9f
commit bb52965b73

View File

@ -212,7 +212,11 @@ fn find_miri() -> PathBuf {
return path.into();
}
let mut path = std::env::current_exe().expect("current executable path invalid");
path.set_file_name("miri");
if cfg!(windows) {
path.set_file_name("miri.exe");
} else {
path.set_file_name("miri");
}
path
}