Skip to content

Commit

Permalink
chore: address cleanup script linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SirGitsalot committed Nov 13, 2023
1 parent 7dcce5e commit 0074be1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/cleanup-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0074be1

Please sign in to comment.