mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 18:10:59 +00:00
fix: Don't panic on multiple $patch: delete strategic merge patches in a single patch file (#5859)
* chore: add test for multiple $patch: delete patches not panicking * fix: don't panic on multiple deletion SM patches
This commit is contained in:
@@ -181,6 +181,10 @@ func (m *resWrangler) GetMatchingResourcesByAnyId(
|
||||
matches IdMatcher) []*resource.Resource {
|
||||
var result []*resource.Resource
|
||||
for _, r := range m.rList {
|
||||
if r.RNode.IsNilOrEmpty() {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, id := range append(r.PrevIds(), r.CurId()) {
|
||||
if matches(id) {
|
||||
result = append(result, r)
|
||||
|
||||
Reference in New Issue
Block a user