Skip to content

Commit 3c15a55

Browse files
committed
Simplify the RUSTC_WRAPPER check
This should be compatible with older versions of rustc, to get the branches more in sync.
1 parent 1b11393 commit 3c15a55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ fn main() {
114114
/// Run `rustc --version` and capture the output, adjusting arguments as needed if `clippy-driver`
115115
/// is used instead.
116116
fn rustc_version_cmd(is_clippy_driver: bool) -> Output {
117-
let rustc_wrapper = env::var_os("RUSTC_WRAPPER").filter(|w| !w.is_empty());
118117
let rustc = env::var_os("RUSTC").expect("Failed to get rustc version: missing RUSTC env");
119118

120-
let mut cmd = match rustc_wrapper {
119+
let mut cmd = match env::var_os("RUSTC_WRAPPER") {
120+
Some(wrapper) if wrapper.is_empty() => Command::new(rustc),
121121
Some(wrapper) => {
122122
let mut cmd = Command::new(wrapper);
123123
cmd.arg(rustc);

0 commit comments

Comments
 (0)