Skip to content

Commit

Permalink
Merge pull request #14043 from hakman/automated-cherry-pick-of-#14041…
Browse files Browse the repository at this point in the history
…-upstream-release-1.23

Automated cherry pick of #14041: Check keyset existence before attempting to distrust
  • Loading branch information
k8s-ci-robot authored Jul 28, 2022
2 parents 9c5eea6 + bc213ad commit 7a185f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/kops/distrust_keypair.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ func distrustKeypair(out io.Writer, name string, keypairIDs []string, keyStore f
keyset, err := keyStore.FindKeyset(name)
if err != nil {
return err
} else if keyset == nil {
return fmt.Errorf("keyset not found")
}

if len(keypairIDs) == 0 {
Expand Down

0 comments on commit 7a185f9

Please sign in to comment.