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

Function printAuthWarnings

internal/ghcmd/cmd.go:324–329  ·  view source on GitHub ↗

printAuthWarnings writes each warning recorded by authCfg to w, prefixed with a warning icon.

(w io.Writer, cs *iostreams.ColorScheme, authCfg gh.AuthConfig)

Source from the content-addressed store, hash-verified

322
323// printAuthWarnings writes each warning recorded by authCfg to w, prefixed with a warning icon.
324func printAuthWarnings(w io.Writer, cs *iostreams.ColorScheme, authCfg gh.AuthConfig) {
325 for _, warning := range authCfg.Warnings() {
326 // Indent continuation lines so a multi-line warning reads as one item.
327 fmt.Fprintf(w, "%s %s\n", cs.WarningIcon(), strings.ReplaceAll(warning, "\n", "\n "))
328 }
329}
330
331func checkForUpdate(ctx context.Context, f *cmdutil.Factory, currentVersion string) (*update.ReleaseInfo, error) {
332 if updaterEnabled == "" || !update.ShouldCheckForUpdate() {

Callers 2

MainFunction · 0.85
Test_printAuthWarningsFunction · 0.85

Calls 2

WarningIconMethod · 0.80
WarningsMethod · 0.65

Tested by 1

Test_printAuthWarningsFunction · 0.68