From ecd37ea662eb8aeb9fd4b36fb924f6aae68f5228 Mon Sep 17 00:00:00 2001 From: Sally O'Malley Date: Wed, 12 Aug 2020 12:23:23 -0400 Subject: [PATCH] get: -o yaml, json set ServerPrint false Kubernetes-commit: 01e344feb6368647dc1a48c7a3a27b5852f9b89d --- pkg/cmd/get/get.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/get/get.go b/pkg/cmd/get/get.go index 6387d785..6cd180cb 100644 --- a/pkg/cmd/get/get.go +++ b/pkg/cmd/get/get.go @@ -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 }