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

Function noLocalFlagSet

internal/cli/cli.go:178–188  ·  view source on GitHub ↗

noLocalFlagSet returns true if no local flags (excluding global flags) are set for the command.

(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

176
177// noLocalFlagSet returns true if no local flags (excluding global flags) are set for the command.
178func noLocalFlagSet(cmd *cobra.Command) bool {
179 localFlagIsSet := false
180 cmd.LocalFlags().VisitAll(func(f *pflag.Flag) {
181 if f.Changed && f.Name != "json" && f.Name != "json-compact" && f.Name != "tenant" && f.Name != "force" && f.Name != "debug" && f.Name != "no-color" {
182 localFlagIsSet = true
183 return
184 }
185 })
186
187 return !localFlagIsSet
188}
189
190func prepareInteractivity(cmd *cobra.Command) {
191 if canPrompt(cmd) || !iostream.IsInputTerminal() {

Callers 11

updateEmailProviderCmdFunction · 0.85
updateRuleCmdFunction · 0.85
shouldAskFunction · 0.85
updateEmailTemplateCmdFunction · 0.85
updateBotDetectionCmdRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected