Skip to content

Commit

Permalink
bugfix in util.sh, fix silent hang
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
chrishiestand committed Feb 17, 2015
1 parent 6f84bda commit 38aeb72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/gke/util.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
}
Expand Down

0 comments on commit 38aeb72

Please sign in to comment.