BUGFIX: REPORT change type always crashes on push (#2130)

This commit is contained in:
Tom Limoncelli 2023-03-08 22:22:12 -08:00 committed by GitHub
parent eb4af05d31
commit ad4b8daa13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)