Skip to content

Commit

Permalink
fix: error handling not catching missing registry container
Browse files Browse the repository at this point in the history
  • Loading branch information
chzar committed Sep 30, 2024
1 parent a73365d commit fa3f89d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kind/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func parseKindVersion(v string) (float64, error) {

func deleteContainerRegistry(dcli *dclient.Client) error {
if err := dcli.ContainerRemove(context.Background(), container_reg_name, container.RemoveOptions{Force: true}); err != nil {
if strings.Contains(err.Error(), ": no such container") {
if strings.Contains(strings.ToLower(err.Error()), ": no such container") {
return nil
}
return fmt.Errorf("failed remove registry container: %w", err)
Expand Down

0 comments on commit fa3f89d

Please sign in to comment.