get: -o yaml, json set ServerPrint false

This commit is contained in:
Sally O'Malley 2020-08-12 12:23:23 -04:00
parent d3edcb7924
commit 01e344feb6
No known key found for this signature in database
GPG Key ID: 9AD4DAB10C905B8C

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
}