HelmChartInflationGenerator: split on yaml document end markers

This commit is contained in:
Khris Richardson
2022-12-06 14:35:43 -08:00
parent 903fbb6ed2
commit 03c1534c38

View File

@@ -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