diff --git a/gcp_cli_create_credential.sh b/gcp_cli_create_credential.sh index bccf0353..82bfe2c6 100755 --- a/gcp_cli_create_credential.sh +++ b/gcp_cli_create_credential.sh @@ -52,9 +52,9 @@ help_usage "$@" name="${1:-$USER-cli}" +# XXX: sets the GCP project for the duration of the script for consistency purposes (relying on gcloud config could lead to race conditions) project="${3:-${CLOUDSDK_CORE_PROJECT:-$(gcloud config list --format='get(core.project)')}}" -# XXX: sets the GCP project for the duration of the script for consistency purposes (relying on gcloud config could lead to race conditions) not_blank "$project" || die "ERROR: no project specified and \$CLOUDSDK_CORE_PROJECT / GCloud SDK config core.project value not set" export CLOUDSDK_CORE_PROJECT="$project"