Skip to content

Commit be1a655

Browse files
committed
Use $RUSTC if it's set in the environment
This keeps the sysroot consistent when there are multiple `rustc` programs floating around. Context: rust-lang/rust#77309
1 parent 99483be commit be1a655

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ pub fn main() {
323323
toolchain_path(home, toolchain)
324324
})
325325
.or_else(|| {
326-
Command::new("rustc")
326+
Command::new(env::var("RUSTC").unwrap_or("rustc"))
327327
.arg("--print")
328328
.arg("sysroot")
329329
.output()

0 commit comments

Comments
 (0)