about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authormoxian <moxian@users.noreply.github.com>2025-03-06 01:07:02 -0800
committermoxian <moxian@users.noreply.github.com>2025-03-06 01:07:02 -0800
commite13af7abca71ec6aac4c2115c9563663b83c88cf (patch)
tree363312a045bba91ed7c3a243362c4a109a9384a4 /src
parent571f95fb94fa51a8003de8a610ac0eba5e02b1a3 (diff)
Don't even bother checking changelog in --dry-run mode
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/bin/main.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs
index 07118164a70..6f6aaa878ef 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<String> {
         ));
 
         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 {