MCPcopy
hub / github.com/cli/cli / DisableAuthCheck

Function DisableAuthCheck

pkg/cmdutil/auth_check.go:13–19  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

11const skipAuthCheckAnnotation = "skipAuthCheck"
12
13func DisableAuthCheck(cmd *cobra.Command) {
14 if cmd.Annotations == nil {
15 cmd.Annotations = map[string]string{}
16 }
17
18 cmd.Annotations[skipAuthCheckAnnotation] = "true"
19}
20
21func DisableAuthCheckFlag(flag *pflag.Flag) {
22 if flag.Annotations == nil {

Callers 15

NewCmdCompletionFunction · 0.92
NewCmdActionsFunction · 0.92
NewCmdAuthFunction · 0.92
NewCmdCopilotFunction · 0.92
NewCmdVersionFunction · 0.92
NewCmdShellAliasFunction · 0.92
NewCmdAliasFunction · 0.92
NewCmdExtensionFunction · 0.92
NewCmdRootFunction · 0.92
NewCmdAliasFunction · 0.92
NewCmdLicensesFunction · 0.92

Calls

no outgoing calls

Tested by 1

Test_IsAuthCheckEnabledFunction · 0.68