From ec9065f2c1e9bf3b00aaa0ecc737bf738f315d90 Mon Sep 17 00:00:00 2001 From: Joakim Roubert Date: Tue, 9 Feb 2021 09:54:55 +0100 Subject: [PATCH] Update after review comment --- cluster/gce/util.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 27cd60e7038..1bfae8ca3d9 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -2371,12 +2371,11 @@ function create-subnetworks() { # Look for the alias subnet, it must exist and have a secondary # range configured. - # Deliberately declare and assign at the same time or the CI pipeline fails - # shellcheck disable=SC2155 - local subnet=$(gcloud compute networks subnets describe \ + local subnet + subnet=$(gcloud compute networks subnets describe \ --project "${NETWORK_PROJECT}" \ --region ${REGION} \ - ${IP_ALIAS_SUBNETWORK} 2>/dev/null) + ${IP_ALIAS_SUBNETWORK} 2>/dev/null || true) if [[ -z ${subnet} ]]; then echo "Creating subnet ${NETWORK}:${IP_ALIAS_SUBNETWORK}" gcloud compute networks subnets create \