Commit aff81e2b authored by Ke Wu's avatar Ke Wu

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.
parent da6808f1
......@@ -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 \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment