Readd the .exe extension on windows

This commit is contained in:
Oliver Schneider 2018-01-17 08:52:41 +01:00
parent b1001e47d6
commit 26f83d6218

View file

@ -180,9 +180,12 @@ where
args.push("--cfg".to_owned()); args.push("--cfg".to_owned());
args.push(r#"feature="cargo-clippy""#.to_owned()); args.push(r#"feature="cargo-clippy""#.to_owned());
let path = std::env::current_exe() let mut path = std::env::current_exe()
.expect("current executable path invalid") .expect("current executable path invalid")
.with_file_name("clippy-driver"); .with_file_name("clippy-driver");
if cfg!(windows) {
path.set_extension("exe");
}
let exit_status = std::process::Command::new("cargo") let exit_status = std::process::Command::new("cargo")
.args(&args) .args(&args)
.env("RUSTC_WRAPPER", path) .env("RUSTC_WRAPPER", path)