Skip to content

Commit

Permalink
Merge pull request #217 from upbound/backport-216-to-release-0.12
Browse files Browse the repository at this point in the history
[Backport release-0.12] Add nil check before filterAnnotations func in cleanupexamples tool
  • Loading branch information
turkenf authored Sep 20, 2024
2 parents 44c3fe8 + aa1e79d commit 427547f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/cleanupexamples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ func processYAML(yamlData []byte) ([]byte, error) {
return nil, fmt.Errorf("cannot decode the YAML file: %w", err)
}

if u == nil {
continue
}

// Remove specific annotations from the decoded Kubernetes object.
filterAnnotations(u)

Expand Down

0 comments on commit 427547f

Please sign in to comment.