From 970dc8803475f3ab5dad17918a8aa2be28e18020 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Mon, 23 Nov 2020 10:06:02 +0000 Subject: [PATCH] updated gcp_info_projects.sh --- gcp_info_projects.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/gcp_info_projects.sh b/gcp_info_projects.sh index 4452247b..a9950922 100755 --- a/gcp_info_projects.sh +++ b/gcp_info_projects.sh @@ -41,17 +41,7 @@ help_usage "$@" if [ $# -gt 0 ]; then project_id="$1" shift || : - current_project="$(gcloud config list --format="value(core.project)")" - if [ -n "$current_project" ]; then - # want interpolation now not at exit - # shellcheck disable=SC2064 - trap "gcloud config set project '$current_project'" EXIT - else - trap "gcloud config unset project" EXIT - fi - gcloud config set project "$project_id" - echo - echo + export CLOUDSDK_CORE_PROJECT="$project_id" fi