Skip to content

Commit a4762c4

Browse files
authored
Merge pull request #805 from mattcary/kubectl-parse
Fix kubectl parsing
2 parents 645b3c2 + e7e1cae commit a4762c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/k8s-integration/cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ func getNormalizedVersion(kubeVersion, gkeVersion string) (string, error) {
352352
}
353353

354354
func getKubeClusterVersion() (string, error) {
355-
out, err := exec.Command("kubectl", "version", "-o=json").CombinedOutput()
355+
out, err := exec.Command("kubectl", "version", "-o=json").Output()
356356
if err != nil {
357-
return "", fmt.Errorf("failed to obtain cluster version, error: %v", err)
357+
return "", fmt.Errorf("failed to obtain cluster version, error: %v; output was %s", err, out)
358358
}
359359
type version struct {
360360
ClientVersion *apimachineryversion.Info `json:"clientVersion,omitempty" yaml:"clientVersion,omitempty"`

0 commit comments

Comments
 (0)