mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Don't use an empty RUSTC_WRAPPER
This commit is contained in:
parent
b15ee255e5
commit
9b67b272ba
@ -66,12 +66,13 @@ impl Rustc {
|
|||||||
|
|
||||||
/// Get a process builder set up to use the found rustc version, with a wrapper if Some
|
/// Get a process builder set up to use the found rustc version, with a wrapper if Some
|
||||||
pub fn process(&self) -> ProcessBuilder {
|
pub fn process(&self) -> ProcessBuilder {
|
||||||
if let Some(ref wrapper) = self.wrapper {
|
match self.wrapper {
|
||||||
|
Some(ref wrapper) if !wrapper.as_os_str().is_empty() => {
|
||||||
let mut cmd = util::process(wrapper);
|
let mut cmd = util::process(wrapper);
|
||||||
cmd.arg(&self.path);
|
cmd.arg(&self.path);
|
||||||
cmd
|
cmd
|
||||||
} else {
|
}
|
||||||
self.process_no_wrapper()
|
_ => self.process_no_wrapper()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -684,3 +684,9 @@ fn proc_macro() {
|
|||||||
).build();
|
).build();
|
||||||
p.cargo("check -v").env("RUST_LOG", "cargo=trace").run();
|
p.cargo("check -v").env("RUST_LOG", "cargo=trace").run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn does_not_use_empty_rustc_wrapper() {
|
||||||
|
let p = project().file("src/lib.rs", "").build();
|
||||||
|
p.cargo("check").env("RUSTC_WRAPPER", "").run();
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user