Unverified Commit b1fea1bd authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #76662 from stuart-mclaren/version-fix

Fix kubectl version --client=true
parents c0c1e148 d4ee919f
...@@ -88,6 +88,9 @@ func NewCmdVersion(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *co ...@@ -88,6 +88,9 @@ func NewCmdVersion(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *co
// Complete completes all the required options // Complete completes all the required options
func (o *Options) Complete(f cmdutil.Factory, cmd *cobra.Command) error { func (o *Options) Complete(f cmdutil.Factory, cmd *cobra.Command) error {
var err error var err error
if o.ClientOnly {
return nil
}
o.discoveryClient, err = f.ToDiscoveryClient() o.discoveryClient, err = f.ToDiscoveryClient()
// if we had an empty rest.Config, continue and just print out client information. // if we had an empty rest.Config, continue and just print out client information.
// if we had an error other than being unable to build a rest.Config, fail. // if we had an error other than being unable to build a rest.Config, fail.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment