fix SC2267 GNU xargs -i is deprecated in favor of -I{} in cluster/gce/util.sh

see: https://www.shellcheck.net/wiki/SC2267
This commit is contained in:
Benjamin Elder 2022-10-19 12:32:24 -07:00
parent 95d08c58e3
commit 4c7189f54b

View File

@ -2631,7 +2631,7 @@ function delete-subnetworks() {
# This value should be kept in sync with number of regions.
local parallelism=9
gcloud compute networks subnets list --network="${NETWORK}" --project "${NETWORK_PROJECT}" --format='value(region.basename())' | \
xargs -i -P ${parallelism} gcloud --quiet compute networks subnets delete "${NETWORK}" --project "${NETWORK_PROJECT}" --region="{}" || true
xargs -I {} -P ${parallelism} gcloud --quiet compute networks subnets delete "${NETWORK}" --project "${NETWORK_PROJECT}" --region="{}" || true
elif [[ "${CREATE_CUSTOM_NETWORK:-}" == "true" ]]; then
echo "Deleting custom subnet..."
gcloud --quiet compute networks subnets delete "${SUBNETWORK}" --project "${NETWORK_PROJECT}" --region="${REGION}" || true