From 608c958cb33cabb1235fccbf5f893c7fe3d551eb Mon Sep 17 00:00:00 2001 From: chaosinthecrd Date: Tue, 9 Jan 2024 16:45:12 +0000 Subject: [PATCH] adding for loop for marking required flags on sign Signed-off-by: chaosinthecrd --- options/sign.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/options/sign.go b/options/sign.go index f88060c5..1bc37aeb 100644 --- a/options/sign.go +++ b/options/sign.go @@ -36,4 +36,8 @@ func (so *SignOptions) AddFlags(cmd *cobra.Command) { cmd.Flags().StringVarP(&so.OutFilePath, "outfile", "o", "", "File to write signed data. Defaults to stdout") cmd.Flags().StringVarP(&so.InFilePath, "infile", "f", "", "Witness policy file to sign") cmd.Flags().StringSliceVar(&so.TimestampServers, "timestamp-servers", []string{}, "Timestamp Authority Servers to use when signing envelope") + + for _, flag := range RequiredSignFlags { + cmd.MarkFlagRequired(flag) + } }