Skip to content

Commit

Permalink
fix template --output-dir issue
Browse files Browse the repository at this point in the history
Signed-off-by: yxxhero <aiopsclub@163.com>
  • Loading branch information
yxxhero authored and xiongxiong yuan committed Jan 9, 2023
1 parent 774c6ce commit 1c25a1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/helm/template.go
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 1c25a1f

Please sign in to comment.