fix --dry-run when the change-id warning is printed
This commit is contained in:
parent
2b399b5275
commit
520662eb2a
2 changed files with 2 additions and 2 deletions
|
@ -143,7 +143,7 @@ fn check_version(config: &Config) -> Option<String> {
|
|||
"update `config.toml` to use `change-id = {latest_change_id}` instead"
|
||||
));
|
||||
|
||||
if io::stdout().is_terminal() {
|
||||
if io::stdout().is_terminal() && !config.dry_run() {
|
||||
t!(fs::write(warned_id_path, latest_change_id.to_string()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1741,7 +1741,7 @@ impl Config {
|
|||
config
|
||||
}
|
||||
|
||||
pub(crate) fn dry_run(&self) -> bool {
|
||||
pub fn dry_run(&self) -> bool {
|
||||
match self.dry_run {
|
||||
DryRun::Disabled => false,
|
||||
DryRun::SelfCheck | DryRun::UserSelected => true,
|
||||
|
|
Loading…
Add table
Reference in a new issue