Hint adding codespace scope to auth login (#7961)
This commit is contained in:
parent
94fbbdf9b5
commit
c5a7bf8f45
1 changed files with 5 additions and 1 deletions
|
|
@ -72,7 +72,11 @@ func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) (*cobra.Command,
|
|||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
// require that the user is authenticated before running most commands
|
||||
if cmdutil.IsAuthCheckEnabled(cmd) && !cmdutil.CheckAuth(cfg) {
|
||||
fmt.Fprint(io.ErrOut, authHelp())
|
||||
if cmd.Parent().Use == "codespace" {
|
||||
fmt.Fprintln(io.ErrOut, "To get started with GitHub CLI, please run: gh auth login -s codespace")
|
||||
} else {
|
||||
fmt.Fprint(io.ErrOut, authHelp())
|
||||
}
|
||||
return &AuthError{}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue