This commit is contained in:
vilmibm 2020-08-19 10:11:16 -05:00
parent c02b396971
commit 621f6a262b
2 changed files with 1 additions and 2 deletions

View file

@ -31,7 +31,7 @@ func httpClient(io *iostreams.IOStreams, cfg config.Config, appVersion string, s
token, err := cfg.Get(hostname, "oauth_token")
if err != nil || token == "" {
// Users shouldn't see this because of the pre-execute auth check on commands
return "", fmt.Errorf("authentication required for %s; please run `gh auth login -h%s", hostname, hostname)
return "", fmt.Errorf("authentication required for %s; please run `gh auth login -h %s", hostname, hostname)
}
return fmt.Sprintf("token %s", token), nil

View file

@ -98,7 +98,6 @@ func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) *cobra.Command {
return &cmdutil.FlagError{Err: err}
})
// TODO does this make sense? I'd like people to be able to see usage without an auth message.
cmdutil.DisableAuthCheck(cmd)
// CHILD COMMANDS