Skip to content

Commit

Permalink
Fix empty array expansion error in cluster/gce/util.sh
Browse files Browse the repository at this point in the history
Empty array expansion causes "unbound variable" error in
bash 4.2 and bash 4.3.
  • Loading branch information
kewu1992 committed Apr 4, 2019
1 parent 1c105e1 commit 925dc7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,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 \
Expand Down

0 comments on commit 925dc7f

Please sign in to comment.