mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-16 17:33:14 +00:00
fix a patch files accept multiple patches (#5194)
* fix a patch files accept multiple patches * fix comments and variable name * add error handling when using not allowed multiple strategic-merge patches * fix error message of Multiple Strategic-Merge Patch file * refactor transformStrategicMerge() * add TODO comment and test for Multiple JSON patch Yaml documents are not allowed * refactoring PatchTransformer * add multiple patch test for PatchTransformer package * improve error message to PatchTransformer * refactor const and error message check * fix some error messages
This commit is contained in:
@@ -696,8 +696,7 @@ func (m *resWrangler) DeAnchor() (err error) {
|
||||
}
|
||||
|
||||
// ApplySmPatch applies the patch, and errors on Id collisions.
|
||||
func (m *resWrangler) ApplySmPatch(
|
||||
selectedSet *resource.IdSet, patch *resource.Resource) error {
|
||||
func (m *resWrangler) ApplySmPatch(selectedSet *resource.IdSet, patch *resource.Resource) error {
|
||||
var list []*resource.Resource
|
||||
for _, res := range m.rList {
|
||||
if selectedSet.Contains(res.CurId()) {
|
||||
|
||||
Reference in New Issue
Block a user