fix newTemplateCmd

Redefine err in the if statement to prevent it from being assigned to the external err variable.

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
pull/9075/head
Zhou Hao 5 years ago
parent 2be0d141a6
commit 0a9976e681

@ -91,7 +91,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
if client.UseReleaseName { if client.UseReleaseName {
newDir = filepath.Join(client.OutputDir, client.ReleaseName) 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 { if err != nil {
return err return err
} }

Loading…
Cancel
Save