printAuthWarnings writes each warning recorded by authCfg to w, prefixed with a warning icon.
(w io.Writer, cs *iostreams.ColorScheme, authCfg gh.AuthConfig)
| 322 | |
| 323 | // printAuthWarnings writes each warning recorded by authCfg to w, prefixed with a warning icon. |
| 324 | func 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 | |
| 331 | func checkForUpdate(ctx context.Context, f *cmdutil.Factory, currentVersion string) (*update.ReleaseInfo, error) { |
| 332 | if updaterEnabled == "" || !update.ShouldCheckForUpdate() { |