File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -199,14 +199,18 @@ pub fn version() -> Result<Version> {
199
199
/// like the git short hash and build date.
200
200
pub fn version_meta ( ) -> Result < VersionMeta > {
201
201
let rustc = env:: var_os ( "RUSTC" ) . unwrap_or_else ( || OsString :: from ( "rustc" ) ) ;
202
- let cmd = if let Some ( wrapper) = env:: var_os ( "RUSTC_WRAPPER" ) . filter ( |w| !w. is_empty ( ) ) {
202
+ let mut cmd = if let Some ( wrapper) = env:: var_os ( "RUSTC_WRAPPER" ) . filter ( |w| !w. is_empty ( ) ) {
203
203
let mut cmd = Command :: new ( wrapper) ;
204
204
cmd. arg ( rustc) ;
205
205
cmd
206
206
} else {
207
207
Command :: new ( rustc)
208
208
} ;
209
209
210
+ if let Some ( toolchain) = env:: var_os ( "RUSTUP_TOOLCHAIN" ) {
211
+ cmd. env ( "RUSTUP_TOOLCHAIN" , toolchain) ;
212
+ }
213
+
210
214
VersionMeta :: for_command ( cmd)
211
215
}
212
216
You can’t perform that action at this time.
0 commit comments