Skip to content

Commit

Permalink
Simplify the RUSTC_WRAPPER check
Browse files Browse the repository at this point in the history
This should be compatible with older versions of rustc, to get the
branches more in sync.
  • Loading branch information
tgross35 committed Sep 10, 2024
1 parent 1b11393 commit 3c15a55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ fn main() {
/// Run `rustc --version` and capture the output, adjusting arguments as needed if `clippy-driver`
/// is used instead.
fn rustc_version_cmd(is_clippy_driver: bool) -> Output {
let rustc_wrapper = env::var_os("RUSTC_WRAPPER").filter(|w| !w.is_empty());
let rustc = env::var_os("RUSTC").expect("Failed to get rustc version: missing RUSTC env");

let mut cmd = match rustc_wrapper {
let mut cmd = match env::var_os("RUSTC_WRAPPER") {
Some(wrapper) if wrapper.is_empty() => Command::new(rustc),
Some(wrapper) => {
let mut cmd = Command::new(wrapper);
cmd.arg(rustc);
Expand Down

0 comments on commit 3c15a55

Please sign in to comment.