Skip to content
Myr

Revert change so help is printed on stdout again (#1004)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixes #1002 For backwards compatibility reasons, and to follow the need of https://github.com/kubernetes/kubernetes/pull/26077#issuecomment-230818900 the help message should be printed on stdout.

authored by Marc Khouzam · committed by Eric Paris · parent b04b5bf · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:command.go+3 added-1 removed
370 unmodified lines
371 return c.Parent().HelpFunc()372 }373 return func(c *Command, a []string) {374 c.mergePersistentFlags()375 // The help should be sent to stdout376 // See https://github.com/spf13/cobra/issues/1002375 err := tmpl(c.OutOrStderr(), c.HelpTemplate(), c)377 err := tmpl(c.OutOrStdout(), c.HelpTemplate(), c)378 if err != nil {379 c.Println(err)380 }381 }
1226 unmodified lines