From 38aeb72bf79fdff59c8d7cbbab965cb17be745fe Mon Sep 17 00:00:00 2001 From: Chris Hiestand Date: Tue, 17 Feb 2015 01:35:24 -0800 Subject: [PATCH] bugfix in util.sh, fix silent hang `gcloud preview --help >/dev/null 2>&1` would silently hang if the preview component was not installed. Instead, let stderr flow normally. to reproduce the bug and verify the fix: 1. gcloud components remove preview #answer yes 2. gcloud preview --help >/dev/null 2>&1 #note the hang, ^C 3A. gcloud preview --help >/dev/null #now prompts you to install preview component the fix also works when run via "kube-up.sh" alternatively: `gcloud -q preview --help >/dev/null 2>&1` will silently install the missing preview component --- cluster/gke/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 cluster/gke/util.sh diff --git a/cluster/gke/util.sh b/cluster/gke/util.sh old mode 100644 new mode 100755 index 9a1457de9ba..24d551e508a --- a/cluster/gke/util.sh +++ b/cluster/gke/util.sh @@ -70,7 +70,7 @@ function test-build-release() { function verify-prereqs() { echo "... in verify-prereqs()" >&2 - ${GCLOUD} preview --help >/dev/null 2>&1 || { + ${GCLOUD} preview --help >/dev/null || { echo "Either the GCLOUD environment variable is wrong, or the 'preview' component" echo "is not installed. (Fix with 'gcloud components update preview')" }