Skip to content

Commit 933e118

Browse files
committed
restore the RUSTC/RUSTDOC env after rustc-fake cmd substitution
1 parent 0496037 commit 933e118

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/Cargo.toml b/Cargo.toml
2+
index 12ee1eec..9a92219e 100644
3+
--- a/Cargo.toml
4+
+++ b/Cargo.toml
5+
@@ -205,6 +205,7 @@ version = "0.4.26"
6+
default-features = false
7+
8+
[features]
9+
+default = [ "vendored-openssl" ]
10+
deny-warnings = []
11+
pretty-env-logger = ["pretty_env_logger"]
12+
vendored-openssl = ["openssl/vendored"]

collector/src/bin/rustc-fake.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,18 @@ fn main() {
3232
let mut args_os = env::args_os();
3333
let name = args_os.next().unwrap().into_string().unwrap();
3434

35-
let mut args = args_os.collect::<Vec<_>>();
36-
let rustc = env::var_os("RUSTC_REAL").unwrap();
3735
let actually_rustdoc = name.ends_with("rustdoc-fake");
3836
let tool = if actually_rustdoc {
3937
let rustdoc = env::var_os("RUSTDOC_REAL").unwrap();
38+
env::set_var("RUSTDOC", &rustdoc);
4039
rustdoc
4140
} else {
42-
rustc
41+
// rustc
42+
args_os.next().unwrap()
4343
};
4444

45+
let mut args = args_os.collect::<Vec<_>>();
46+
4547
if let Some(count) = env::var("RUSTC_THREAD_COUNT")
4648
.ok()
4749
.and_then(|v| v.parse::<u32>().ok())

0 commit comments

Comments
 (0)