Skip to content

Commit c583d07

Browse files
committed
fix parser to not discard the first yaml document
ups
1 parent cf2fb5d commit c583d07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manifest/parse.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ func ParseRelease(release *release.Release, includeTests bool) map[string]*Mappi
8484

8585
// Parse parses manifest strings into MappingResult
8686
func Parse(manifest string, defaultNamespace string, excludedHooks ...string) map[string]*MappingResult {
87-
scanner := bufio.NewScanner(strings.NewReader(manifest))
87+
// ensure we have a newline in front of the yaml seperator
88+
scanner := bufio.NewScanner(strings.NewReader("\n" + manifest))
8889
scanner.Split(scanYamlSpecs)
8990
//Allow for tokens (specs) up to 1M in size
9091
scanner.Buffer(make([]byte, bufio.MaxScanTokenSize), 1048576)

0 commit comments

Comments
 (0)