Merge pull request #93940 from sallyom/get-json-yaml-client-side-print

get: -o yaml, json set ServerPrint false
This commit is contained in:
Kubernetes Prow Robot 2020-08-27 04:48:25 -07:00 committed by GitHub
commit 012b4f493b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}