···11+--- a/tests/integration.rs
22++++ b/tests/integration.rs
33+@@ -16,20 +16,13 @@ impl CommandUnderTest {
44+ fn new() -> CommandUnderTest {
55+ // To find the directory where the built binary is, we walk up the directory tree of the test binary until the
66+ // parent is "target/".
77+- let mut binary_path = env::current_exe().expect("need current binary path to find binary to test");
88+- loop {
99+- {
1010+- let parent = binary_path.parent();
1111+- if parent.is_none() {
1212+- panic!("Failed to locate binary path from original path: {:?}", env::current_exe());
1313+- }
1414+- let parent = parent.unwrap();
1515+- if parent.is_dir() && parent.file_name().unwrap() == "target" {
1616+- break;
1717+- }
1818+- }
1919+- binary_path.pop();
2020+- }
2121++ let mut binary_path = PathBuf::from(
2222++ env::current_dir()
2323++ .unwrap()
2424++ .join("target")
2525++ .join("@shortTarget@")
2626++ .join(env!("cargoBuildType")),
2727++ );
2828+2929+ binary_path.push(
3030+ if cfg!(target_os = "windows") {