Report full template result if it is invalid YAML

Signed-off-by: Karoline Pauls <code@karolinepauls.com>
pull/8221/head
Karoline Pauls 5 years ago
parent 15d9a6190f
commit 6551576e3b

@ -143,7 +143,7 @@ func (file *manifestFile) sort(result *result) error {
var entry SimpleHead var entry SimpleHead
if err := yaml.Unmarshal([]byte(m), &entry); err != nil { if err := yaml.Unmarshal([]byte(m), &entry); err != nil {
return errors.Wrapf(err, "YAML parse error on %s", file.path) return errors.Wrapf(err, "Error in template %s:\n### RESULT START\n%s\n### RESULT END\nYAML parse error on %s", file.path, m, file.path)
} }
if !hasAnyAnnotation(entry) { if !hasAnyAnnotation(entry) {

Loading…
Cancel
Save