cmd/options: kubectl options writes to out stream

Previous behavior was to write to stderr (thanks to the fallback system
in the Cobra library), which made it difficult to grep for flags.

For example:

	kubectl options | grep recursive
This commit is contained in:
Alexander Campbell
2017-05-25 10:36:42 -07:00
parent 382a170054
commit 0d65d9594c
3 changed files with 12 additions and 4 deletions

View File

@@ -378,7 +378,7 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
cmds.AddCommand(NewCmdVersion(f, out))
cmds.AddCommand(NewCmdApiVersions(f, out))
cmds.AddCommand(deprecatedAlias("apiversions", NewCmdApiVersions(f, out)))
cmds.AddCommand(NewCmdOptions())
cmds.AddCommand(NewCmdOptions(out))
return cmds
}