From 6fd376a04f21d5ee841344278bc0332b1867d22b Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Fri, 27 Mar 2015 13:53:26 -0700 Subject: [PATCH] Fix the scripts to optionally skip prompts and also return successfully no matter what. --- cluster/gce/util.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 520d2476100..0b1fa9122ba 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -24,6 +24,8 @@ source "${KUBE_ROOT}/cluster/common.sh" NODE_INSTANCE_PREFIX="${INSTANCE_PREFIX}-minion" +KUBE_PROMPT_FOR_UPDATE=y + # Verify prereqs function verify-prereqs { local cmd @@ -43,8 +45,11 @@ function verify-prereqs { fi done # update and install components as needed - gcloud components update preview - gcloud components update + if [[ "${KUBE_PROMPT_FOR_UPDATE}" != "y" ]]; then + gcloud_prompt="-q" + fi + gcloud ${gcloud_prompt:-} components update preview || true + gcloud ${gcloud_prompt:-} components update || true } # Create a temp dir that'll be deleted at the end of this bash session.