From 03c1534c38cd0f116e1fdac57e41a813b455473b Mon Sep 17 00:00:00 2001 From: Khris Richardson Date: Tue, 6 Dec 2022 14:35:43 -0800 Subject: [PATCH] HelmChartInflationGenerator: split on yaml document end markers --- .../helmchartinflationgenerator/HelmChartInflationGenerator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go index 234856db9..1d75fab54 100644 --- a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go +++ b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go @@ -258,7 +258,7 @@ func (p *plugin) Generate() (rm resmap.ResMap, err error) { // try to remove the contents before first "---" because // helm may produce messages to stdout before it stdoutStr := string(stdout) - if idx := strings.Index(stdoutStr, "---"); idx != -1 { + if idx := strings.Index(stdoutStr, "\n---\n"); idx != -1 { return p.h.ResmapFactory().NewResMapFromBytes([]byte(stdoutStr[idx:])) } return nil, err