Skip to content

Commit 3262f92

Browse files
authored
Merge pull request #3136 from mikerite/driver-rustc-arg-2
driver: Improve check for rustc arg
2 parents dc164f4 + 4f7a260 commit 3262f92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/driver.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use rustc_driver::{self, driver::CompileController, Compilation};
88
use rustc_plugin;
9+
use std::path::Path;
910
use std::process::{exit, Command};
1011

1112
#[allow(clippy::print_stdout)]
@@ -47,7 +48,7 @@ pub fn main() {
4748
if orig_args.len() <= 1 {
4849
std::process::exit(1);
4950
}
50-
if orig_args[1] == "rustc" {
51+
if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
5152
// we still want to be able to invoke it normally though
5253
orig_args.remove(1);
5354
}

0 commit comments

Comments
 (0)