Fixes kubectl skew test failure when using kubectl.sh

This commit is contained in:
Fabiano Franz 2017-03-10 12:48:08 -03:00
parent 4ff0af821a
commit adea540a5b

View File

@ -593,7 +593,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
// we need the actual kubectl binary, not the script wrapper
kubectlPathNormalizer := exec.Command("which", kubectlPath)
if strings.HasSuffix(kubectlPath, "kubectl.sh") {
kubectlPathNormalizer = exec.Command("sh", "-c", kubectlPath, "path")
kubectlPathNormalizer = exec.Command(kubectlPath, "path")
}
kubectlPathNormalized, err := kubectlPathNormalizer.Output()
framework.ExpectNoError(err)