From 223ac1464215e7c5927c467c09888b194a91c5e0 Mon Sep 17 00:00:00 2001 From: Liz Rice Date: Fri, 29 Jun 2018 10:35:44 +0100 Subject: [PATCH] Don't override version specified on command line --- cmd/common.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/common.go b/cmd/common.go index 9e4cfef..1536d7c 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -52,12 +52,11 @@ func runChecks(t check.NodeType) { ver = kubeVersion } else { ver = getKubeVersion() - } - - switch ver { - case "1.9", "1.10": - continueWithError(nil, fmt.Sprintf("No CIS spec for %s - using tests from CIS 1.2.0 spec for Kubernetes 1.8\n", ver)) - ver = "1.8" + switch ver { + case "1.9", "1.10": + continueWithError(nil, fmt.Sprintf("No CIS spec for %s - using tests from CIS 1.2.0 spec for Kubernetes 1.8\n", ver)) + ver = "1.8" + } } path := filepath.Join(cfgDir, ver)