We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 599b9e9 commit 7bffe77Copy full SHA for 7bffe77
src/lib.rs
@@ -198,9 +198,16 @@ pub fn version() -> Result<Version> {
198
/// Returns the `rustc` SemVer version and additional metadata
199
/// like the git short hash and build date.
200
pub fn version_meta() -> Result<VersionMeta> {
201
- let cmd = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc"));
+ let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc"));
202
+ let cmd = if let Some(wrapper) = env::var_os("RUSTC_WRAPPER") {
203
+ let mut cmd = Command::new(wrapper);
204
+ cmd.arg(rustc);
205
+ cmd
206
+ } else {
207
+ Command::new(rustc)
208
+ };
209
- VersionMeta::for_command(Command::new(cmd))
210
+ VersionMeta::for_command(cmd)
211
}
212
213
/// Parses a "rustc -vV" output string and returns
0 commit comments