mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 17:34:21 +00:00
Revert "[fix] configMapGenerator: extra space in end of line gives "\n" instead of line breaks"
This commit is contained in:
@@ -5,7 +5,6 @@ package generators
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/go-errors/errors"
|
||||
"sigs.k8s.io/kustomize/api/ifc"
|
||||
@@ -51,11 +50,7 @@ func makeValidatedDataMap(
|
||||
return nil, errors.Errorf(
|
||||
"configmap %s illegally repeats the key `%s`", name, p.Key)
|
||||
}
|
||||
lines := strings.Split(p.Value, "\n")
|
||||
for i := range lines {
|
||||
lines[i] = strings.TrimSuffix(lines[i], " ")
|
||||
}
|
||||
knownKeys[p.Key] = strings.Join(lines, "\n")
|
||||
knownKeys[p.Key] = p.Value
|
||||
}
|
||||
return knownKeys, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user