MCPcopy Create free account
hub / github.com/auth0/auth0-cli / shouldAsk

Function shouldAsk

internal/cli/flags.go:436–445  ·  view source on GitHub ↗
(cmd *cobra.Command, f *Flag, isUpdate bool)

Source from the content-addressed store, hash-verified

434}
435
436func shouldAsk(cmd *cobra.Command, f *Flag, isUpdate bool) bool {
437 if isUpdate {
438 if !f.IsRequired && !f.AlwaysPrompt {
439 return false
440 }
441 return canPrompt(cmd) && noLocalFlagSet(cmd)
442 }
443
444 return canPrompt(cmd) && !f.IsSet(cmd)
445}
446
447func markFlagRequired(cmd *cobra.Command, f *Flag, isUpdate bool) error {
448 if f.IsRequired && !isUpdate {

Callers 10

AskIntSliceMethod · 0.85
askFlagFunction · 0.85
askManyFlagFunction · 0.85
askBoolFlagFunction · 0.85
askIntFlagFunction · 0.85
selectFlagFunction · 0.85
pickFlagFunction · 0.85
pickManyFlagFunction · 0.85
askPasswordFlagFunction · 0.85
openEditorFlagFunction · 0.85

Calls 3

canPromptFunction · 0.85
noLocalFlagSetFunction · 0.85
IsSetMethod · 0.80

Tested by

no test coverage detected