mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
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.
This commit is contained in:
parent
1c105e1629
commit
925dc7f2e0
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user