File tree 2 files changed +20
-7
lines changed
2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -502,16 +502,14 @@ impl<'a> Cfg<'a> {
502
502
& self ,
503
503
toolchain : Option < PartialToolchainDesc > ,
504
504
) -> anyhow:: Result < Toolchain < ' _ > > {
505
- match toolchain {
505
+ let toolchain = match toolchain {
506
506
Some ( toolchain) => {
507
507
let desc = toolchain. resolve ( & self . get_default_host_triple ( ) ?) ?;
508
- Ok ( Toolchain :: new (
509
- self ,
510
- LocalToolchainName :: Named ( ToolchainName :: Official ( desc) ) ,
511
- ) ?)
508
+ Some ( LocalToolchainName :: Named ( ToolchainName :: Official ( desc) ) )
512
509
}
513
- None => Ok ( self . find_or_install_active_toolchain ( false ) . await ?. 0 ) ,
514
- }
510
+ None => None ,
511
+ } ;
512
+ self . local_toolchain ( toolchain)
515
513
}
516
514
517
515
pub ( crate ) fn find_active_toolchain (
Original file line number Diff line number Diff line change @@ -2142,6 +2142,12 @@ components = [ "rust-src" ]
2142
2142
)
2143
2143
. unwrap ( ) ;
2144
2144
2145
+ cx. config
2146
+ . expect_stderr_ok (
2147
+ & [ "rustup" , "toolchain" , "install" ] ,
2148
+ "info: installing component 'rust-src'" ,
2149
+ )
2150
+ . await ;
2145
2151
cx. config
2146
2152
. expect_stdout_ok ( & [ "rustup" , "component" , "list" ] , "rust-src (installed)" )
2147
2153
. await ;
@@ -2169,6 +2175,12 @@ targets = [ "arm-linux-androideabi" ]
2169
2175
)
2170
2176
. unwrap ( ) ;
2171
2177
2178
+ cx. config
2179
+ . expect_stderr_ok (
2180
+ & [ "rustup" , "toolchain" , "install" ] ,
2181
+ "info: installing component 'rust-std' for 'arm-linux-androideabi'" ,
2182
+ )
2183
+ . await ;
2172
2184
cx. config
2173
2185
. expect_stdout_ok (
2174
2186
& [ "rustup" , "component" , "list" ] ,
@@ -2225,6 +2237,9 @@ channel = "nightly"
2225
2237
"# ,
2226
2238
)
2227
2239
. unwrap ( ) ;
2240
+ cx. config
2241
+ . expect_ok ( & [ "rustup" , "toolchain" , "install" ] )
2242
+ . await ;
2228
2243
cx. config
2229
2244
. expect_not_stdout_ok (
2230
2245
& [ "rustup" , "component" , "list" ] ,
You can’t perform that action at this time.
0 commit comments