Skip to content
Snippets Groups Projects
Commit 42ed8628 authored by Weston Steimel's avatar Weston Steimel Committed by Abubakr-Sadik Nii Nai Davis
Browse files

Only get runningVersion if --version has not been provided

parent f2062e81
Branches
Tags
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.
Please register or to comment