Merge pull request #5710 from cli/completion-output-fix
Fix Cobra completion output going to stdout
This commit is contained in:
commit
0bd36fe03a
1 changed files with 2 additions and 2 deletions
|
|
@ -57,8 +57,8 @@ func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
cmd.SetOut(f.IOStreams.ErrOut) // command usage summary and deprecation warnings
|
||||
cmd.SetErr(f.IOStreams.ErrOut) // error messages
|
||||
// cmd.SetOut(f.IOStreams.Out) // can't use due to https://github.com/spf13/cobra/issues/1708
|
||||
// cmd.SetErr(f.IOStreams.ErrOut) // just let it default to os.Stderr instead
|
||||
|
||||
cmd.Flags().Bool("version", false, "Show gh version")
|
||||
cmd.PersistentFlags().Bool("help", false, "Show help for command")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue