From a079326ac0c73a1939e05d355ccffcc16dadd578 Mon Sep 17 00:00:00 2001 From: Aeddis Desauw Date: Wed, 8 Jan 2025 11:49:13 +0100 Subject: [PATCH] fix: mark name flag as required in UpdateKeyCmd --- cmd/okms/keys/keys.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/okms/keys/keys.go b/cmd/okms/keys/keys.go index bdee43c..52b8b61 100644 --- a/cmd/okms/keys/keys.go +++ b/cmd/okms/keys/keys.go @@ -394,6 +394,9 @@ func newUpdateKeyCmd() *cobra.Command { } cmd.Flags().StringVar(&name, "name", "", "Update key with a new name") + if err := cmd.MarkFlagRequired("name"); err != nil { + panic(err) + } return cmd }