Skip to content

Commit

Permalink
upd(inline config): check new line in configuration string
Browse files Browse the repository at this point in the history
  • Loading branch information
TLDMain committed Nov 9, 2024
1 parent 46c8b7c commit 2c2b0be
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/internal/plugins/builtinconfig/transformerconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package builtinconfig
import (
"log"
"sort"
"strings"
"sync"

"sigs.k8s.io/kustomize/api/ifc"
Expand Down Expand Up @@ -85,11 +86,14 @@ func MakeTransformerConfig(
}
var paths []string
for _, configuration := range configurations {
config, err := makeTransformerConfigFromBytes([]byte(configuration))
if err != nil {
if (!strings.Contains(configuration, "\n") && !strings.Contains(configuration, "\r")) {
paths = append(paths, configuration)
continue
}
config, err := makeTransformerConfigFromBytes([]byte(configuration))
if err != nil {
return nil, err
}
t1, err = t1.Merge(config)
if err != nil {
return nil, err
Expand Down

0 comments on commit 2c2b0be

Please sign in to comment.