Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

fix: cli: return an error when creating a secret that already exists (#2408) #2417

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/cli/secret_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ func (a *SecretCreate) Run(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
} else {
return fmt.Errorf("secret %s already exists", args[0])
}
} else if err != nil {
return err
Expand Down
Loading