Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Commit

Permalink
fix: return error/nil on login cmd run
Browse files Browse the repository at this point in the history
  • Loading branch information
mainawycliffe committed Dec 10, 2019
1 parent 36a712a commit c6fdda1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) {
RunE: func(cmd *cobra.Command, args []string) error {
noLocalhostFlag, _ := cmd.Flags().GetBool("no-localhost")
if noLocalhostFlag {
oauth.LoginWithoutLocalhost()
return oauth.LoginWithoutLocalhost()
} else {
oauth.LoginWithLocalhost()
}
return nil
},
}

Expand Down

0 comments on commit c6fdda1

Please sign in to comment.