Skip to content

Commit

Permalink
Merge pull request #135 from auth0/tenants-use-dont-login
Browse files Browse the repository at this point in the history
tenants use shouldn't trigger logins
  • Loading branch information
Widcket authored Mar 6, 2021
2 parents c1ed20d + dd7b626 commit 53a4320
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ func Execute() {
return nil
}

// Selecting tenants shouldn't really trigger a login.
if cmd.Use == "use" && cmd.Parent().Use == "tenants" {
return nil
}

// Initialize everything once. Later callers can then
// freely assume that config is fully primed and ready
// to go.
Expand Down
1 change: 1 addition & 0 deletions internal/cli/tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func useTenantCmd(cli *cli) *cobra.Command {
if err := cli.persistConfig(); err != nil {
return fmt.Errorf("An error occurred while setting the default tenant: %w", err)
}
cli.renderer.Infof("Default tenant switched to: %s", selectedTenant)
return nil
},
}
Expand Down

0 comments on commit 53a4320

Please sign in to comment.