diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index 7c92b4505..009b5e432 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -426,7 +426,7 @@ func reformatExecErrorMsg(filename string, err error) error { fmt.Fprintf(&finalErrorString, "%s", fileLocation.String()) } - return errors.New(finalErrorString.String()) + return errors.New(strings.TrimSpace(finalErrorString.String())) } func sortTemplates(tpls map[string]renderable) []string { diff --git a/pkg/engine/engine_test.go b/pkg/engine/engine_test.go index 5359465d4..e99fac2e8 100644 --- a/pkg/engine/engine_test.go +++ b/pkg/engine/engine_test.go @@ -1322,8 +1322,7 @@ NestedHelperFunctions/templates/_helpers_1.tpl:1:39 error calling include: NestedHelperFunctions/charts/common/templates/_helpers_2.tpl:1:50 executing "common.names.get_name" at <.Release.Name>: - nil pointer evaluating interface {}.Name -` + nil pointer evaluating interface {}.Name` v := chartutil.Values{} @@ -1356,8 +1355,7 @@ func TestMultilineNoTemplateAssociatedError(t *testing.T) { expectedErrorMessage := `multiline/templates/svc.yaml:1:9 executing "multiline/templates/svc.yaml" at : error calling include: -template: no template "nested_helper.name" associated with template "gotpl" -` +template: no template "nested_helper.name" associated with template "gotpl"` v := chartutil.Values{}