Skip to content

Commit 520662e

Browse files
committed
fix --dry-run when the change-id warning is printed
1 parent 2b399b5 commit 520662e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bootstrap/src/bin/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fn check_version(config: &Config) -> Option<String> {
143143
"update `config.toml` to use `change-id = {latest_change_id}` instead"
144144
));
145145

146-
if io::stdout().is_terminal() {
146+
if io::stdout().is_terminal() && !config.dry_run() {
147147
t!(fs::write(warned_id_path, latest_change_id.to_string()));
148148
}
149149
}

src/bootstrap/src/core/config/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,7 @@ impl Config {
17411741
config
17421742
}
17431743

1744-
pub(crate) fn dry_run(&self) -> bool {
1744+
pub fn dry_run(&self) -> bool {
17451745
match self.dry_run {
17461746
DryRun::Disabled => false,
17471747
DryRun::SelfCheck | DryRun::UserSelected => true,

0 commit comments

Comments
 (0)