diff --git a/cmd/helm/template.go b/cmd/helm/template.go index 6123d29d4..eef9eb237 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -82,7 +82,6 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { var manifests bytes.Buffer fmt.Fprintln(&manifests, strings.TrimSpace(rel.Manifest)) if !client.DisableHooks { - fileWritten := make(map[string]bool) for _, m := range rel.Hooks { if client.OutputDir == "" { fmt.Fprintf(&manifests, "---\n# Source: %s\n%s\n", m.Path, m.Manifest) @@ -91,11 +90,10 @@ 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, true) if err != nil { return err } - fileWritten[m.Path] = true } }