From b0715e96e41f92664436b2aa73ce75c323655387 Mon Sep 17 00:00:00 2001 From: Miguel Bernabeu Diaz Date: Fri, 1 Feb 2019 15:30:04 +0100 Subject: [PATCH] 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. --- commands/previewPush.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/previewPush.go b/commands/previewPush.go index f4317f95f..27d75323f 100644 --- a/commands/previewPush.go +++ b/commands/previewPush.go @@ -165,6 +165,9 @@ DomainLoop: if anyErrors { return errors.Errorf("Completed with errors") } + if totalCorrections != 0 { + return errors.Errorf("Corrections pending") + } return nil }