From cfb1526856bd04730775a69fcb28276c1da4a455 Mon Sep 17 00:00:00 2001 From: Odin Ugedal Date: Tue, 22 Sep 2020 14:57:49 +0200 Subject: [PATCH] Print warnings to stderr Warnings should be written to stderr to avoid invalidating the output of commands. This applies to eg. helm template Signed-off-by: Odin Ugedal --- cmd/helm/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/helm/root.go b/cmd/helm/root.go index 91542bb7e..85e9a01b6 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "log" + "os" "strings" "github.com/spf13/cobra" @@ -205,7 +206,7 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string loadPlugins(cmd, out) // Check permissions on critical files - checkPerms(out) + checkPerms(os.Stderr) return cmd, nil }