-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rename get-token and try-login commands to test login and test token #100
Conversation
@morganelle might this make more sense as 2 subcommands nested under Check out https://github.com/auth0/auth0-cli/blob/main/internal/cli/clients.go for an example of this pattern. |
Thanks @paddycarey! Just had a talk with @cyx and he suggested the same - I'll update. |
@paddycarey @cyx updated. I hit an issue where I was getting a nil cli because the command was named |
@@ -29,7 +29,7 @@ func Execute() { | |||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error { | |||
// If the user is trying to login, no need to go | |||
// through setup. | |||
if cmd.Use == "login" { | |||
if cmd.Use == "login" && cmd.Parent().Use == "auth0" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good thanks for working through it! 👍
Description
rename get-token and try-login commands to test login and test token
References
https://auth0team.atlassian.net/browse/CLI-4
https://auth0team.atlassian.net/browse/CLI-5
Testing
Tested manually
Checklist
master