Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
a7ab81f8
Unverified
Commit
a7ab81f8
authored
Aug 01, 2018
by
Matthew Fisher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup connection after displaying client version
parent
bda27b6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
version.go
cmd/helm/version.go
+7
-9
No files found.
cmd/helm/version.go
View file @
a7ab81f8
...
@@ -73,15 +73,6 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command {
...
@@ -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 {
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment