diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs index fd103876319ea..b1ab8dae535db 100644 --- a/src/bootstrap/src/bin/main.rs +++ b/src/bootstrap/src/bin/main.rs @@ -174,7 +174,7 @@ fn check_version(config: &Config) -> Option { "update `config.toml` to use `change-id = {latest_change_id}` instead" )); - if io::stdout().is_terminal() { + if io::stdout().is_terminal() && !config.dry_run() { t!(fs::write(warned_id_path, latest_change_id.to_string())); } } diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index ff51760e1932b..969cd88593494 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -1969,7 +1969,7 @@ impl Config { config } - pub(crate) fn dry_run(&self) -> bool { + pub fn dry_run(&self) -> bool { match self.dry_run { DryRun::Disabled => false, DryRun::SelfCheck | DryRun::UserSelected => true,