Skip to content

Commit

Permalink
Don't even bother checking changelog in --dry-run mode
Browse files Browse the repository at this point in the history
  • Loading branch information
moxian committed Mar 6, 2025
1 parent 571f95f commit e13af7a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/bootstrap/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit e13af7a

Please sign in to comment.