@@ -354,8 +354,9 @@ async fn file_override_toolchain_err_handling() {
354
354
async fn plus_override_toolchain_err_handling ( ) {
355
355
let cx = CliTestContext :: new ( Scenario :: SimpleV2 ) . await ;
356
356
cx. config
357
- . expect_err (
357
+ . expect_err_env (
358
358
& [ "rustc" , "+beta" ] ,
359
+ & [ ( "RUSTUP_AUTO_INSTALL" , "0" ) ] ,
359
360
for_host ! ( "toolchain 'beta-{0}' is not installed" ) ,
360
361
)
361
362
. await ;
@@ -776,8 +777,9 @@ async fn upgrade_v2_to_v1() {
776
777
async fn list_targets_no_toolchain ( ) {
777
778
let cx = CliTestContext :: new ( Scenario :: SimpleV2 ) . await ;
778
779
cx. config
779
- . expect_err (
780
+ . expect_err_env (
780
781
& [ "rustup" , "target" , "list" , "--toolchain=nightly" ] ,
782
+ & [ ( "RUSTUP_AUTO_INSTALL" , "0" ) ] ,
781
783
for_host ! ( "toolchain 'nightly-{0}' is not installed" ) ,
782
784
)
783
785
. await ;
@@ -962,18 +964,20 @@ async fn remove_target_by_component_remove() {
962
964
async fn add_target_no_toolchain ( ) {
963
965
let cx = CliTestContext :: new ( Scenario :: SimpleV2 ) . await ;
964
966
cx. config
965
- . expect_err (
967
+ . expect_err_env (
966
968
& [
967
969
"rustup" ,
968
970
"target" ,
969
971
"add" ,
970
972
CROSS_ARCH1 ,
971
973
"--toolchain=nightly" ,
972
974
] ,
975
+ & [ ( "RUSTUP_AUTO_INSTALL" , "0" ) ] ,
973
976
for_host ! ( "toolchain 'nightly-{0}' is not installed" ) ,
974
977
)
975
978
. await ;
976
979
}
980
+
977
981
#[ tokio:: test]
978
982
async fn add_target_bogus ( ) {
979
983
let mut cx = CliTestContext :: new ( Scenario :: SimpleV2 ) . await ;
@@ -1120,14 +1124,15 @@ async fn remove_target_not_installed() {
1120
1124
async fn remove_target_no_toolchain ( ) {
1121
1125
let cx = CliTestContext :: new ( Scenario :: SimpleV2 ) . await ;
1122
1126
cx. config
1123
- . expect_err (
1127
+ . expect_err_env (
1124
1128
& [
1125
1129
"rustup" ,
1126
1130
"target" ,
1127
1131
"remove" ,
1128
1132
CROSS_ARCH1 ,
1129
1133
"--toolchain=nightly" ,
1130
1134
] ,
1135
+ & [ ( "RUSTUP_AUTO_INSTALL" , "0" ) ] ,
1131
1136
for_host ! ( "toolchain 'nightly-{0}' is not installed" ) ,
1132
1137
)
1133
1138
. await ;
0 commit comments