Skip to content

Commit

Permalink
Merge pull request #11487 from yxxhero/fix_template_with_output_dir
Browse files Browse the repository at this point in the history
fix template --output-dir issue
  • Loading branch information
mattfarina committed Feb 1, 2023
2 parents 76157c6 + 1c25a1f commit 5bf273d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/helm/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,15 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
if client.UseReleaseName {
newDir = filepath.Join(client.OutputDir, client.ReleaseName)
}
_, err := os.Stat(filepath.Join(newDir, m.Path))
if err == nil {
fileWritten[m.Path] = true
}

err = writeToFile(newDir, m.Path, m.Manifest, fileWritten[m.Path])
if err != nil {
return err
}
fileWritten[m.Path] = true
}

}
Expand Down

0 comments on commit 5bf273d

Please sign in to comment.