Skip to content

Commit

Permalink
Fix unhandled error warning for YAML delete
Browse files Browse the repository at this point in the history
Explicitly ignore errors during the deletion of the well known metadata entries.
  • Loading branch information
HeavyWombat committed Feb 19, 2021
1 parent ca58449 commit 202b007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cmd/lastApplied.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ func lookUpLastAppliedConfiguration(inputFile ytbx.InputFile) (ytbx.InputFile, e
}

func purgeWellKnownMetadataEntries(document *yamlv3.Node) {
ytbx.Delete(document, "/metadata/annotations/kubectl.kubernetes.io\\/last-applied-configuration")
_, _ = ytbx.Delete(document, "/metadata/annotations/kubectl.kubernetes.io\\/last-applied-configuration")
}

0 comments on commit 202b007

Please sign in to comment.