From 611bba0f51770d9b6671183171505e68b801383d Mon Sep 17 00:00:00 2001 From: Anubhav Mishra Date: Sat, 25 Mar 2017 19:27:05 -0700 Subject: [PATCH] fix(helm): manifests string parsing works for newlines in the manifests Trying to fix #2158 --- pkg/releaseutil/manifest.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/releaseutil/manifest.go b/pkg/releaseutil/manifest.go index b6bb87b0a..5cb1fe3e9 100644 --- a/pkg/releaseutil/manifest.go +++ b/pkg/releaseutil/manifest.go @@ -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 }