From e72305a3c3e99c9c3d629bd4ca9cce5512fca730 Mon Sep 17 00:00:00 2001 From: brendan-coughlan Date: Fri, 3 Jan 2025 01:20:09 -0800 Subject: [PATCH] remove stdout for create snapshot, fix later --- cmd/createSnapshot.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/createSnapshot.go b/cmd/createSnapshot.go index ac386d29..a3fc8299 100644 --- a/cmd/createSnapshot.go +++ b/cmd/createSnapshot.go @@ -74,9 +74,7 @@ var createSnapshotCmd = &cobra.Command{ dump.SetPath(filepath.Dir(output)) dump.SetFileName(filepath.Base(output)) } else { - // Output to stdout - dump.SetPath("") - dump.SetFileName("") + l.Sugar().Fatal("Output path must be specified") } // Execute the dump command @@ -102,5 +100,6 @@ func initCreateSnapshotCmd(cmd *cobra.Command) { } func init() { - createSnapshotCmd.Flags().StringVarP(&output, "output", "f", "", "Path to save the snapshot file to (default is stdout)") + createSnapshotCmd.Flags().StringVarP(&output, "output", "f", "", "Path to save the snapshot file to (required)") + createSnapshotCmd.MarkFlagRequired("output") }