Skip to content
Snippets Groups Projects
Unverified Commit ba437d50 authored by Liz Rice's avatar Liz Rice Committed by GitHub
Browse files

Merge pull request #206 from westonsteimel/no_runningversion_if_version_set

Only get runningVersion if --version has not been provided
parents 8dabb7dc 42f41520
No related branches found
No related tags found
No related merge requests found
...@@ -44,9 +44,12 @@ func runChecks(nodetype check.NodeType) { ...@@ -44,9 +44,12 @@ func runChecks(nodetype check.NodeType) {
file = federatedFile file = federatedFile
} }
runningVersion, err := getKubeVersion() runningVersion := ""
if err != nil && kubeVersion == "" { if kubeVersion == "" {
exitWithError(fmt.Errorf("Version check failed: %s\nAlternatively, you can specify the version with --version", err)) runningVersion, err = getKubeVersion()
if err != nil {
exitWithError(fmt.Errorf("Version check failed: %s\nAlternatively, you can specify the version with --version", err))
}
} }
path, err := getConfigFilePath(kubeVersion, runningVersion, file) path, err := getConfigFilePath(kubeVersion, runningVersion, file)
if err != nil { if err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment