From ad4b8daa137e74b421dc95e5e25560e2d050ead1 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Wed, 8 Mar 2023 22:22:12 -0800 Subject: [PATCH] BUGFIX: REPORT change type always crashes on push (#2130) --- commands/previewPush.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/commands/previewPush.go b/commands/previewPush.go index 6eee2cac8..8c65bfd3f 100644 --- a/commands/previewPush.go +++ b/commands/previewPush.go @@ -2,11 +2,12 @@ package commands import ( "fmt" - "golang.org/x/net/idna" "log" "os" "strings" + "golang.org/x/net/idna" + "github.com/StackExchange/dnscontrol/v3/models" "github.com/StackExchange/dnscontrol/v3/pkg/credsfile" "github.com/StackExchange/dnscontrol/v3/pkg/nameservers" @@ -495,10 +496,12 @@ func printOrRunCorrections(domain string, provider string, corrections []*models if interactive && !out.PromptToRun() { continue } - err = correction.F() - out.EndCorrection(err) - if err != nil { - anyErrors = true + if correction.F != nil { + err = correction.F() + out.EndCorrection(err) + if err != nil { + anyErrors = true + } } } notifier.Notify(domain, provider, correction.Msg, err, !push)