get: -o yaml, json set ServerPrint false

Kubernetes-commit: 01e344feb6368647dc1a48c7a3a27b5852f9b89d
This commit is contained in:
Sally O'Malley 2020-08-12 12:23:23 -04:00 committed by Kubernetes Publisher
parent 1da7838a03
commit ecd37ea662
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ func (o *GetOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []stri
// TODO (soltysh): currently we don't support custom columns
// with server side print. So in these cases force the old behavior.
outputOption := cmd.Flags().Lookup("output").Value.String()
if outputOption == "custom-columns" {
if strings.Contains(outputOption, "custom-columns") || outputOption == "yaml" || strings.Contains(outputOption, "json") {
o.ServerPrint = false
}