From fa890063a18fb97470b1b4b47318e016bc2b5b85 Mon Sep 17 00:00:00 2001 From: imlonghao Date: Sun, 17 Sep 2023 03:52:59 +0800 Subject: [PATCH] BUG: Ensure report location is not empty (#2560) --- commands/previewPush.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/previewPush.go b/commands/previewPush.go index 70b1d4370..38b6a3543 100644 --- a/commands/previewPush.go +++ b/commands/previewPush.go @@ -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