Skip to content

Commit

Permalink
Change how unit test gets current exe
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaeroxe committed Oct 17, 2023
1 parent 6a027d1 commit 5c6208b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ fn test_failure() {
#[test]
#[cfg(windows)]
fn windows_no_extension_but_executable() {
let this_executable = PathBuf::from(std::env::args().next().unwrap());
let this_executable = std::env::current_exe().unwrap();
let new_name = this_executable.parent().unwrap().join("test_executable");
std::fs::copy(&this_executable, &new_name).unwrap();
let found_executable = which::which_in_global(
Expand Down

0 comments on commit 5c6208b

Please sign in to comment.