File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -77,5 +77,5 @@ build_test() {
7777if [ -z " $SKIP_TESTS " ]; then
7878 target_cargo run --features test -- --dump-testament
7979 build_test build
80- build_test test
80+ RUSTUP_CI=1 build_test test
8181fi
Original file line number Diff line number Diff line change @@ -418,6 +418,12 @@ impl<'a> Cfg<'a> {
418418 }
419419
420420 pub ( crate ) fn get_self_update_mode ( & self ) -> Result < SelfUpdateMode > {
421+ if self . process . var ( "CI" ) . is_ok ( ) && self . process . var ( "RUSTUP_CI" ) . is_err ( ) {
422+ // If we're in CI (but not rustup's own CI, which wants to test this stuff!),
423+ // disable automatic self updates.
424+ return Ok ( SelfUpdateMode :: Disable ) ;
425+ }
426+
421427 self . settings_file . with ( |s| {
422428 Ok ( match s. auto_self_update {
423429 Some ( mode) => mode,
You can’t perform that action at this time.
0 commit comments