mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 04:55:22 +00:00
Ignore missing path error in conditional match
Signed-off-by: Sean Blong <seanblong@gmail.com>
This commit is contained in:
1
changelogs/unreleased/7410-seanblong
Normal file
1
changelogs/unreleased/7410-seanblong
Normal file
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user