Skip to content

Commit 0867fae

Browse files
authored
Merge pull request #188 from justinsb/less_logging_applying_patches
Early-exit when applying no patches
2 parents 40a33c4 + 551495e commit 0867fae

File tree

1 file changed

+4
-1
lines changed
  • pkg/patterns/declarative/pkg/manifest

1 file changed

+4
-1
lines changed

pkg/patterns/declarative/pkg/manifest/patch.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ import (
2828
)
2929

3030
func (objects *Objects) Patch(patches []*unstructured.Unstructured) error {
31-
log := log.Log
31+
if len(patches) == 0 {
32+
return nil
33+
}
3234

35+
log := log.Log
3336
for i, o := range objects.Items {
3437
log.WithValues("object", o).Info("applying patches")
3538

0 commit comments

Comments
 (0)