From 26f83d621889b2a7474cd0542c63c77a5a15c02e Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 17 Jan 2018 08:52:41 +0100 Subject: [PATCH] Readd the .exe extension on windows --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8affe549348..8fd485b9efa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -180,9 +180,12 @@ where args.push("--cfg".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") .with_file_name("clippy-driver"); + if cfg!(windows) { + path.set_extension("exe"); + } let exit_status = std::process::Command::new("cargo") .args(&args) .env("RUSTC_WRAPPER", path)