Skip to content

Commit e13af7a

Browse files
committed
Don't even bother checking changelog in --dry-run mode
1 parent 571f95f commit e13af7a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/bootstrap/src/bin/main.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ fn main() {
7070
}
7171

7272
// check_version warnings are not printed during setup, or during CI
73-
let changelog_suggestion = if matches!(config.cmd, Subcommand::Setup { .. }) || CiEnv::is_ci() {
74-
None
75-
} else {
76-
check_version(&config)
77-
};
73+
let changelog_suggestion =
74+
if matches!(config.cmd, Subcommand::Setup { .. }) || CiEnv::is_ci() || config.dry_run() {
75+
None
76+
} else {
77+
check_version(&config)
78+
};
7879

7980
// NOTE: Since `./configure` generates a `config.toml`, distro maintainers will see the
8081
// changelog warning, not the `x.py setup` message.
@@ -188,7 +189,6 @@ fn check_version(config: &Config) -> Option<String> {
188189
));
189190

190191
if io::stdout().is_terminal() {
191-
t!(std::fs::create_dir_all(warned_id_path.parent().unwrap()));
192192
t!(fs::write(warned_id_path, latest_change_id.to_string()));
193193
}
194194
} else {

0 commit comments

Comments
 (0)