Skip to content

Commit

Permalink
Show error when unauthorized
Browse files Browse the repository at this point in the history
  • Loading branch information
zugao committed Apr 23, 2020
1 parent 4e63788 commit 23927f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cmd/configmaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ func validateConfigMapCommandInput(args []string) error {

func executeConfigMapCleanupCommand(args []string) error {
if len(args) == 0 || len(config.Resource.Labels) == 0 {
listConfigMaps(args)
if err := listConfigMaps(args); err != nil {
return err
}
return nil
}

Expand Down
4 changes: 3 additions & 1 deletion cmd/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ func validateSecretCommandInput(args []string) error {

func executeSecretCleanupCommand(args []string) error {
if len(args) == 0 || len(config.Resource.Labels) == 0 {
listSecrets(args)
if err := listSecrets(args); err != nil {
return err
}
return nil
}

Expand Down

0 comments on commit 23927f8

Please sign in to comment.