Ignore missing path error in conditional match
Signed-off-by: Sean Blong <seanblong@gmail.com>pull/7410/head
parent
3b8370e13c
commit
cf460d51c3
|
@ -0,0 +1 @@
|
|||
Ignore missing path error in conditional match
|
|
@ -172,7 +172,7 @@ func matchConditions(u *unstructured.Unstructured, rules []MatchRule, _ logrus.F
|
|||
p := &JSONPatcher{patches: fixed}
|
||||
_, err := p.applyPatch(u)
|
||||
if err != nil {
|
||||
if errors.Is(err, jsonpatch.ErrTestFailed) {
|
||||
if errors.Is(err, jsonpatch.ErrTestFailed) || errors.Is(err, jsonpatch.ErrMissing) {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
|
|
Loading…
Reference in New Issue