Skip to content

Commit 96b8cc4

Browse files
committed
Fix kubectl parsing
Change-Id: I11936494c0245937d07ab14324f98bf053576e2f
1 parent 61a2280 commit 96b8cc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/k8s-integration/cluster.go

+2-2
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)