diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 4c8e2dac6..d61805d7c 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -310,7 +310,7 @@ func shouldPrompt(cmd *cobra.Command, flag string) bool { func shouldPromptWhenFlagless(cmd *cobra.Command, flag string) bool { isSet := false - cmd.Flags().VisitAll(func(f *pflag.Flag) { + cmd.LocalFlags().VisitAll(func(f *pflag.Flag) { if (f.Changed) { isSet = true }