From 1f9473eb6f61dd7414ee752c37d6f0e8f34b7477 Mon Sep 17 00:00:00 2001 From: Cyril David Date: Sat, 20 Mar 2021 09:45:42 -0700 Subject: [PATCH] Subtle fix: update && not required should not prompt --- internal/cli/flags.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/cli/flags.go b/internal/cli/flags.go index 22474c86e..54a4c78bb 100644 --- a/internal/cli/flags.go +++ b/internal/cli/flags.go @@ -134,6 +134,10 @@ func registerBool(cmd *cobra.Command, f *Flag, value *bool, defaultValue bool, i func shouldAsk(cmd *cobra.Command, f *Flag, isUpdate bool) bool { if isUpdate { + if !f.IsRequired { + return false + } + return shouldPromptWhenFlagless(cmd, f.LongForm) }