mirror of
https://github.com/kubernetes/client-go.git
synced 2025-12-25 14:12:27 +00:00
Fixes https://github.com/kubernetes/client-go/issues/327 Currently we're not capturing stderr when shelling out to "gcloud config config-helper --format=json" fails. This patch is capturing the stderr in the error message returned. This gcloud command sometimes returns an upgrade reminder (in stderr) so using `cmd.CombinedOutput()` is not an option here. Maybe we should also add an unit test in gcp_test.go capturing this situation, too, in case someone decides to replace this with CombinedOutput someday. Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com> Kubernetes-commit: 1334523c73fea3b3d9d0e90f287b3e385c79e6cd