Fix empty array expansion error in cluster/gce/util.sh

Empty array expansion causes "unbound variable" error in
bash 4.2 and bash 4.3.
pull/564/head
Ke Wu 2019-04-03 17:22:03 -07:00
parent da6808f1da
commit aff81e2b0d
1 changed files with 1 additions and 1 deletions

View File

@ -3027,7 +3027,7 @@ function kube-down() {
# change during a cluster upgrade.)
local templates=$(get-template "${PROJECT}")
local all_instance_groups=(${INSTANCE_GROUPS[@]} ${WINDOWS_INSTANCE_GROUPS[@]})
local all_instance_groups=(${INSTANCE_GROUPS[@]:-} ${WINDOWS_INSTANCE_GROUPS[@]:-})
for group in ${all_instance_groups[@]:-}; do
if gcloud compute instance-groups managed describe "${group}" --project "${PROJECT}" --zone "${ZONE}" &>/dev/null; then
gcloud compute instance-groups managed delete \