style: trim space from formatted error messages

Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
pull/13586/head
Jesse Simpson 5 months ago
parent 0e0a8cc765
commit d10c5f6429
No known key found for this signature in database
GPG Key ID: 237495C89AB0AAFC

@ -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 {

@ -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 <include "nested_helper.name" .>:
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{}

Loading…
Cancel
Save