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 <odin@uged.al>
pull/8790/head
Odin Ugedal 5 years ago
parent 367277afc2
commit cfb1526856
No known key found for this signature in database
GPG Key ID: AFF9C8242CF7A7AF

@ -21,6 +21,7 @@ import (
"fmt" "fmt"
"io" "io"
"log" "log"
"os"
"strings" "strings"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@ -205,7 +206,7 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string
loadPlugins(cmd, out) loadPlugins(cmd, out)
// Check permissions on critical files // Check permissions on critical files
checkPerms(out) checkPerms(os.Stderr)
return cmd, nil return cmd, nil
} }

Loading…
Cancel
Save