MCPcopy Create free account
hub / github.com/cli/cli / ShouldCopyToClipboard

Function ShouldCopyToClipboard

pkg/cmd/auth/shared/login_flow.go:48–53  ·  view source on GitHub ↗

ShouldCopyToClipboard resolves an explicit flag value before falling back to configuration.

(cfg gh.Config, flagValue *bool)

Source from the content-addressed store, hash-verified

46
47// ShouldCopyToClipboard resolves an explicit flag value before falling back to configuration.
48func ShouldCopyToClipboard(cfg gh.Config, flagValue *bool) bool {
49 if flagValue != nil {
50 return *flagValue
51 }
52 return cfg.Clipboard().Value == "enabled"
53}
54
55func Login(opts *LoginOptions) error {
56 cfg := opts.Config

Callers 3

refreshRunFunction · 0.92
loginRunFunction · 0.92

Calls 1

ClipboardMethod · 0.65

Tested by 1