Skip to content

Commit

Permalink
handle keyboard interrupts in login and tenants use cmds (#245)
Browse files Browse the repository at this point in the history
Co-authored-by: Rita Zerrizuela <[email protected]>
  • Loading branch information
morganelle and Widcket authored Apr 9, 2021
1 parent 6c80cc1 commit 55c55d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/cli/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func logoutCmd(cli *cli) *cobra.Command {

input := prompt.SelectInput("tenant", "Tenant:", "Tenant to logout", tenNames, tenNames[0], true)
if err := prompt.AskOne(input, &selectedTenant); err != nil {
return fmt.Errorf("An unexpected error occurred: %w", err)
return handleInputError(err)
}
} else {
requestedTenant := args[0]
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func useTenantCmd(cli *cli) *cobra.Command {

input := prompt.SelectInput("tenant", "Tenant:", "Tenant to activate", tenNames, tenNames[0], true)
if err := prompt.AskOne(input, &selectedTenant); err != nil {
return fmt.Errorf("An unexpected error occurred: %w", err)
return handleInputError(err)
}
} else {
requestedTenant := args[0]
Expand Down

0 comments on commit 55c55d8

Please sign in to comment.