mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-06 05:04:29 +08:00
Return error for pending corrections in preview (#438)
Return a non-zero error code if there are corrections for preview step. This is especially useful for automated alerting and scripting around changes to the zone not reflected in the configuration.
This commit is contained in:
parent
061ea63322
commit
b0715e96e4
1 changed files with 3 additions and 0 deletions
|
@ -165,6 +165,9 @@ DomainLoop:
|
|||
if anyErrors {
|
||||
return errors.Errorf("Completed with errors")
|
||||
}
|
||||
if totalCorrections != 0 {
|
||||
return errors.Errorf("Corrections pending")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue