maint(win): improve setup_env on Windows

This commit is contained in:
Diavolo 2023-11-04 07:27:58 +01:00
parent 174333ff93
commit 935a72e05b
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5

View File

@ -334,6 +334,10 @@ fn setup_env() {
println!("{:#?}", error); println!("{:#?}", error);
colored::control::SHOULD_COLORIZE.set_override(false); colored::control::SHOULD_COLORIZE.set_override(false);
}); });
if let Ok(current_exe) = env::current_exe() {
env::set_current_dir(binary_path_str);
}
} }
fn arg_value(args: &[String], arg: &str) -> Option<String> { fn arg_value(args: &[String], arg: &str) -> Option<String> {