mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #76662 from stuart-mclaren/version-fix
Fix kubectl version --client=true
This commit is contained in:
commit
b1fea1bdf5
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user