Don't even bother checking changelog in --dry-run mode
This commit is contained in:
parent
571f95fb94
commit
e13af7abca
1 changed files with 6 additions and 6 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue