From e5038fb04f5e1f134740ddc3a64b794313e85a9c Mon Sep 17 00:00:00 2001 From: a-hat <51818964+a-hat@users.noreply.github.com> Date: Tue, 30 Jul 2019 03:43:30 +0200 Subject: [PATCH] print yaml content on error in fromYaml (#765) --- pkg/tmpl/context_funcs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tmpl/context_funcs.go b/pkg/tmpl/context_funcs.go index 28a6f691..9b563348 100644 --- a/pkg/tmpl/context_funcs.go +++ b/pkg/tmpl/context_funcs.go @@ -149,7 +149,7 @@ func FromYaml(str string) (Values, error) { m := Values{} if err := yaml.Unmarshal([]byte(str), &m); err != nil { - return nil, err + return nil, fmt.Errorf("%s, offending yaml: %s", err, str) } return m, nil }