Merge pull request #206 from westonsteimel/no_runningversion_if_version_set

Only get runningVersion if --version has not been provided
pull/208/head v0.0.24
Liz Rice 5 years ago committed by GitHub
commit ba437d500a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -44,9 +44,12 @@ func runChecks(nodetype check.NodeType) {
file = federatedFile
}
runningVersion, err := getKubeVersion()
if err != nil && kubeVersion == "" {
exitWithError(fmt.Errorf("Version check failed: %s\nAlternatively, you can specify the version with --version", err))
runningVersion := ""
if kubeVersion == "" {
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)
if err != nil {

Loading…
Cancel
Save