File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -649,7 +649,7 @@ impl<'a> Cfg<'a> {
649
649
Err ( RustupError :: ToolchainNotInstalled ( _) ) => {
650
650
if matches ! ( toolchain_name, ToolchainName :: Custom ( _) ) {
651
651
bail ! (
652
- "Toolchain {toolchain_name} in {} is custom and not installed" ,
652
+ "custom toolchain specified in override file '{}' is not installed" ,
653
653
toolchain_file. display( )
654
654
)
655
655
}
Original file line number Diff line number Diff line change @@ -2487,7 +2487,37 @@ async fn file_override_not_installed_custom() {
2487
2487
raw:: write_file ( & toolchain_file, "gumbo" ) . unwrap ( ) ;
2488
2488
2489
2489
cx. config
2490
- . expect_err ( & [ "rustc" , "--version" ] , "custom and not installed" )
2490
+ . expect_err (
2491
+ & [ "rustup" , "show" , "active-toolchain" ] ,
2492
+ "custom toolchain specified in override file" ,
2493
+ )
2494
+ . await ;
2495
+ cx. config
2496
+ . expect_err (
2497
+ & [ "rustc" , "--version" ] ,
2498
+ "custom toolchain specified in override file" ,
2499
+ )
2500
+ . await ;
2501
+ }
2502
+
2503
+ #[ tokio:: test]
2504
+ async fn file_override_not_installed_custom_toml ( ) {
2505
+ let cx = CliTestContext :: new ( Scenario :: None ) . await ;
2506
+ let cwd = cx. config . current_dir ( ) ;
2507
+ let toolchain_file = cwd. join ( "rust-toolchain.toml" ) ;
2508
+ raw:: write_file ( & toolchain_file, r#"toolchain.channel = "i-am-the-walrus""# ) . unwrap ( ) ;
2509
+
2510
+ cx. config
2511
+ . expect_err (
2512
+ & [ "rustup" , "show" , "active-toolchain" ] ,
2513
+ "custom toolchain specified in override file" ,
2514
+ )
2515
+ . await ;
2516
+ cx. config
2517
+ . expect_err (
2518
+ & [ "rustc" , "--version" ] ,
2519
+ "custom toolchain specified in override file" ,
2520
+ )
2491
2521
. await ;
2492
2522
}
2493
2523
You can’t perform that action at this time.
0 commit comments