mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
BUG: Ensure report location is not empty (#2560)
This commit is contained in:
@ -293,7 +293,7 @@ func run(args PreviewArgs, push bool, interactive bool, out printer.CLI, report
|
||||
if totalCorrections != 0 && args.WarnChanges {
|
||||
return fmt.Errorf("there are pending changes")
|
||||
}
|
||||
if report != nil {
|
||||
if report != nil && *report != "" {
|
||||
f, err := os.OpenFile(*report, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user