Skip to content

Commit

Permalink
Disable automatic self updates in CI environments
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Jun 25, 2024
1 parent 4c3ff9c commit 250f1fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@ impl<'a> Cfg<'a> {
}

pub(crate) fn get_self_update_mode(&self) -> Result<SelfUpdateMode> {
if self.process.var("CI").is_ok() {
return Ok(SelfUpdateMode::Disable);
}

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

0 comments on commit 250f1fb

Please sign in to comment.