Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit 518ed3f

Browse files
authored
Merge pull request #144 from zackmdavis/and_the_case_of_the_environment_variable
use RUSTC environment var in `parse_and_replace::compile` if present
2 parents a2538c5 + c666342 commit 518ed3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/parse_and_replace.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ extern crate difference;
1313

1414
use std::collections::HashSet;
1515
use std::ffi::OsString;
16+
use std::env;
1617
use std::fs;
1718
use std::path::{Path, PathBuf};
1819
use std::process::Output;
@@ -49,7 +50,7 @@ fn compile(file: &Path, mode: &str) -> Result<Output, Error> {
4950
args.push("--edition=2018".into());
5051
}
5152

52-
let res = duct::cmd("rustc", &args)
53+
let res = duct::cmd(env::var_os("RUSTC").unwrap_or("rustc".into()), &args)
5354
.env("CLIPPY_DISABLE_DOCS_LINKS", "true")
5455
.env_remove("RUST_LOG")
5556
.stdout_capture()

0 commit comments

Comments
 (0)