Remove spurious debug output

Log to debug log instead of stdout.

Signed-off-by: Simon Rüegg <simon@rueggs.ch>
pull/8992/head
Simon Rüegg 5 years ago
parent d9c5754dfc
commit 5af1077e40
No known key found for this signature in database
GPG Key ID: FFE2AA177FBD7E17

@ -197,7 +197,7 @@ func writeToFile(outputDir string, name string, data string, append bool) error
return err
}
fmt.Printf("wrote %s\n", outfileName)
debug("wrote %s\n", outfileName)
return nil
}

@ -186,7 +186,7 @@ func (c *Configuration) renderResources(ch *chart.Chart, values chartutil.Values
if outputDir == "" {
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", crd.Name, string(crd.File.Data[:]))
} else {
err = writeToFile(outputDir, crd.Filename, string(crd.File.Data[:]), fileWritten[crd.Name])
err = writeToFile(outputDir, crd.Filename, string(crd.File.Data[:]), fileWritten[crd.Name], c.Log)
if err != nil {
return hs, b, "", err
}
@ -207,7 +207,7 @@ func (c *Configuration) renderResources(ch *chart.Chart, values chartutil.Values
// output dir is only used by `helm template`. In the next major
// release, we should move this logic to template only as it is not
// used by install or upgrade
err = writeToFile(newDir, m.Name, m.Content, fileWritten[m.Name])
err = writeToFile(newDir, m.Name, m.Content, fileWritten[m.Name], c.Log)
if err != nil {
return hs, b, "", err
}

@ -480,7 +480,7 @@ func (i *Install) replaceRelease(rel *release.Release) error {
}
// write the <data> to <output-dir>/<name>. <append> controls if the file is created or content will be appended
func writeToFile(outputDir string, name string, data string, append bool) error {
func writeToFile(outputDir string, name string, data string, append bool, log DebugLog) error {
outfileName := strings.Join([]string{outputDir, name}, string(filepath.Separator))
err := ensureDirectoryForFile(outfileName)
@ -501,7 +501,7 @@ func writeToFile(outputDir string, name string, data string, append bool) error
return err
}
fmt.Printf("wrote %s\n", outfileName)
log("wrote %s\n", outfileName)
return nil
}

Loading…
Cancel
Save