|
|
@ -73,15 +73,6 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command {
|
|
|
|
if !version.showClient && !version.showServer {
|
|
|
|
if !version.showClient && !version.showServer {
|
|
|
|
version.showClient, version.showServer = true, true
|
|
|
|
version.showClient, version.showServer = true, true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if version.showServer {
|
|
|
|
|
|
|
|
// We do this manually instead of in PreRun because we only
|
|
|
|
|
|
|
|
// need a tunnel if server version is requested.
|
|
|
|
|
|
|
|
err := setupConnection()
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
version.client = ensureHelmClient(version.client)
|
|
|
|
|
|
|
|
return version.run()
|
|
|
|
return version.run()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -111,6 +102,13 @@ func (v *versionCmd) run() error {
|
|
|
|
return tpl(v.template, data, v.out)
|
|
|
|
return tpl(v.template, data, v.out)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// We do this manually instead of in PreRun because we only
|
|
|
|
|
|
|
|
// need a tunnel if server version is requested.
|
|
|
|
|
|
|
|
if err := setupConnection(); err != nil {
|
|
|
|
|
|
|
|
return err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
v.client = ensureHelmClient(v.client)
|
|
|
|
|
|
|
|
|
|
|
|
if settings.Debug {
|
|
|
|
if settings.Debug {
|
|
|
|
k8sVersion, err := getK8sVersion()
|
|
|
|
k8sVersion, err := getK8sVersion()
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|