From 0a9976e681ce2ce0cfa504dcd0841727f77a961c Mon Sep 17 00:00:00 2001 From: Zhou Hao Date: Tue, 1 Dec 2020 13:51:27 +0800 Subject: [PATCH] fix newTemplateCmd Redefine err in the if statement to prevent it from being assigned to the external err variable. Signed-off-by: Zhou Hao --- cmd/helm/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/template.go b/cmd/helm/template.go index 6123d29d4..e1e8ea6eb 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -91,7 +91,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { if client.UseReleaseName { newDir = filepath.Join(client.OutputDir, client.ReleaseName) } - err = writeToFile(newDir, m.Path, m.Manifest, fileWritten[m.Path]) + err := writeToFile(newDir, m.Path, m.Manifest, fileWritten[m.Path]) if err != nil { return err }