diff --git a/cmd/root.go b/cmd/root.go index 50d7be255..145a01b72 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -60,7 +60,7 @@ func NewRootCommand(out io.Writer) (*cobra.Command, *RootOptions) { SilenceErrors: true, SilenceUsage: true, PersistentPreRun: func(cmd *cobra.Command, args []string) { - log.Init(options.Debug, cmd.OutOrStdout()) + log.Init(options.Debug, cmd.ErrOrStderr()) }, } rootCmd.SetOut(out)