diff --git a/core/pkg/fixhandler/yamlhandler.go b/core/pkg/fixhandler/yamlhandler.go index 45e64f7f..5b5048d2 100644 --- a/core/pkg/fixhandler/yamlhandler.go +++ b/core/pkg/fixhandler/yamlhandler.go @@ -23,8 +23,6 @@ func decodeDocumentRoots(yamlAsString string) ([]yaml.Node, error) { var node yaml.Node err := dec.Decode(&node) - nodes = append(nodes, node) - if errors.Is(err, io.EOF) { break } @@ -32,6 +30,8 @@ func decodeDocumentRoots(yamlAsString string) ([]yaml.Node, error) { return nil, fmt.Errorf("Cannot Decode File as YAML") } + + nodes = append(nodes, node) } return nodes, nil