From e13af7abca71ec6aac4c2115c9563663b83c88cf Mon Sep 17 00:00:00 2001 From: moxian Date: Thu, 6 Mar 2025 01:07:02 -0800 Subject: [PATCH] Don't even bother checking changelog in --dry-run mode --- src/bootstrap/src/bin/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs index 07118164a706..6f6aaa878ef6 100644 --- a/src/bootstrap/src/bin/main.rs +++ b/src/bootstrap/src/bin/main.rs @@ -70,11 +70,12 @@ fn main() { } // check_version warnings are not printed during setup, or during CI - let changelog_suggestion = if matches!(config.cmd, Subcommand::Setup { .. }) || CiEnv::is_ci() { - None - } else { - check_version(&config) - }; + let changelog_suggestion = + if matches!(config.cmd, Subcommand::Setup { .. }) || CiEnv::is_ci() || config.dry_run() { + None + } else { + check_version(&config) + }; // NOTE: Since `./configure` generates a `config.toml`, distro maintainers will see the // changelog warning, not the `x.py setup` message. @@ -188,7 +189,6 @@ fn check_version(config: &Config) -> Option { )); if io::stdout().is_terminal() { - t!(std::fs::create_dir_all(warned_id_path.parent().unwrap())); t!(fs::write(warned_id_path, latest_change_id.to_string())); } } else {