Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ build_test() {
if [ -z "$SKIP_TESTS" ]; then
target_cargo run --features test -- --dump-testament
build_test build
build_test test
RUSTUP_CI=1 build_test test
fi
6 changes: 6 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ impl<'a> Cfg<'a> {
}

pub(crate) fn get_self_update_mode(&self) -> Result<SelfUpdateMode> {
if self.process.var("CI").is_ok() && self.process.var("RUSTUP_CI").is_err() {
// If we're in CI (but not rustup's own CI, which wants to test this stuff!),
// disable automatic self updates.
return Ok(SelfUpdateMode::Disable);
}

self.settings_file.with(|s| {
Ok(match s.auto_self_update {
Some(mode) => mode,
Expand Down