chore: address cleanup script linter warnings

This commit is contained in:
Chris Hawk 2023-11-13 11:54:09 -08:00
parent 7dcce5e379
commit 0074be1248

View file

@ -42,12 +42,13 @@ cleanup_resource() {
if [ -z "$extra_list_arg" ]
then
resources=( $(gcloud "${resource_group}" "${resource}" list --project="${PROJECT_ID}" --format="csv[no-heading](name)") )
mapfile -t resources < <(gcloud "${resource_group}" "${resource}" list --project="${PROJECT_ID}" --format="csv[no-heading](name)")
else
resources=( $(gcloud "${resource_group}" "${resource}" list --project="${PROJECT_ID}" --format="csv[no-heading](name)" "${extra_list_arg}") )
mapfile -t resources < <(gcloud "${resource_group}" "${resource}" list --project="${PROJECT_ID}" --format="csv[no-heading](name)" "${extra_list_arg}")
fi
for resource_id in $resources; do
for resource_id in "${resources[@]}"
do
if [ -z "$extra_delete_arg" ]
then
gcloud "${resource_group}" "${resource}" delete "${resource_id}" --project="${PROJECT_ID}" -q