Revert "do not write empty templates to disk"

This reverts commit da260ec15f.

Signed-off-by: Torsten Walter <mail@torstenwalter.de>
pull/5762/head
Torsten Walter 5 years ago
parent 0528c7bb19
commit 829d8ff4d6

@ -25,7 +25,6 @@ import (
"os"
"path"
"path/filepath"
"regexp"
"sort"
"strings"
"text/template"
@ -64,8 +63,6 @@ const notesFileSuffix = "NOTES.txt"
const defaultDirectoryPermission = 0755
var whitespaceRegex = regexp.MustCompile(`^\s*$`)
// Install performs an installation operation.
type Install struct {
cfg *Configuration
@ -372,10 +369,6 @@ func (c *Configuration) renderResources(ch *chart.Chart, values chartutil.Values
if outputDir == "" {
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", m.Name, m.Content)
} else {
// blank template after execution
if whitespaceRegex.MatchString(m.Content) {
continue
}
err = writeToFile(outputDir, m.Name, m.Content)
if err != nil {
return hs, b, "", err

Loading…
Cancel
Save