fix(helm): manifests string parsing works for newlines in the manifests

Trying to fix #2158
pull/2189/head^2
Anubhav Mishra 9 years ago committed by Anubhav Mishra
parent ea61ace808
commit ef04cf6cf3

@ -40,7 +40,9 @@ func SplitManifests(bigfile string) map[string]string {
sep := "\n---\n"
tpl := "manifest-%d"
res := map[string]string{}
tmp := strings.Split(bigfile, sep)
// Making sure yaml formatting doesn't matter when generating manifest from string.
bigFileTmp := strings.TrimSpace(bigfile)
tmp := strings.Split(bigFileTmp, sep)
for i, d := range tmp {
res[fmt.Sprintf(tpl, i)] = d
}

Loading…
Cancel
Save