From d19b8d86a0f91b5efffd4af618e2f073111dac7e Mon Sep 17 00:00:00 2001 From: Jeaeun Kim Date: Mon, 18 May 2026 00:22:23 +0900 Subject: [PATCH] chore: rename savedErr to clear its specific purpose Signed-off-by: Jeaeun Kim --- pkg/cmd/template.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/template.go b/pkg/cmd/template.go index 0c792977a..a75c48e2e 100644 --- a/pkg/cmd/template.go +++ b/pkg/cmd/template.go @@ -113,7 +113,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { } return err } - savedErr := err + installErr := err // We ignore a potential error here because, when the --debug flag was specified, // we always want to print the YAML, even if it is not valid. The error is still returned afterwards. @@ -188,9 +188,9 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { missing = false } if missing { - if savedErr != nil && settings.Debug { + if installErr != nil && settings.Debug { // assume the manifest itself is too malformed to be rendered - return savedErr + return installErr } return fmt.Errorf("could not find template %s in chart", f) } @@ -203,7 +203,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { } } - return savedErr + return installErr }, }