Skip to content

Commit 2f127dd

Browse files
laxmikantbpandhareadoramshoval
authored andcommitted
updated error message according to new discussion
resolved conflicts
1 parent a4d61b8 commit 2f127dd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

api/internal/builtins/PatchTransformer.go

Lines changed: 3 additions & 2 deletions
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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package main
66

77
import (
88
"fmt"
9+
"log"
910
"strings"
1011

1112
jsonpatch "gopkg.in/evanphx/json-patch.v4"
@@ -138,8 +139,8 @@ func (p *plugin) transformJson6902(m resmap.ResMap) error {
138139
return err
139140
}
140141

141-
if len(resources) == 0 {
142-
return fmt.Errorf("patches target not found for %s", p.Target.ResId)
142+
if p.Options["allowNoTargetMatch"] {
143+
log.Println("Warning: patches target not found for Target")
143144
}
144145

145146
for _, res := range resources {

0 commit comments

Comments
 (0)