Skip to content

Commit 24ea1b9

Browse files
committed
fix(kustomize): call json6902 only when needed
Call json6902 transformer only when there are patches to apply. Addresses #5956
1 parent 68fa517 commit 24ea1b9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

api/internal/builtins/PatchTransformer.go

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/builtin/patchtransformer/PatchTransformer.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ func (p *plugin) Transform(m resmap.ResMap) error {
9494
if p.smPatches != nil {
9595
return p.transformStrategicMerge(m)
9696
}
97-
return p.transformJson6902(m)
97+
if p.jsonPatches != nil {
98+
return p.transformJson6902(m)
99+
}
100+
return nil
98101
}
99102

100103
// transformStrategicMerge applies each loaded strategic merge patch

0 commit comments

Comments
 (0)