mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
get: -o yaml, json set ServerPrint false
This commit is contained in:
parent
d3edcb7924
commit
01e344feb6
@ -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
|
// TODO (soltysh): currently we don't support custom columns
|
||||||
// with server side print. So in these cases force the old behavior.
|
// with server side print. So in these cases force the old behavior.
|
||||||
outputOption := cmd.Flags().Lookup("output").Value.String()
|
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
|
o.ServerPrint = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user