mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-14 09:04:47 +08:00
BUG: Ensure report location is not empty (#2560)
This commit is contained in:
parent
c01fb2d40b
commit
fa890063a1
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue