Merge pull request #7306 from chaodaiG/fix-bash-bug

This commit is contained in:
Samuel Karp 2022-08-17 12:00:33 -07:00 committed by GitHub
commit 0fd000f59c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,13 +18,9 @@
: "${PROJECT:=k8s-cri-containerd}" : "${PROJECT:=k8s-cri-containerd}"
# GOOGLE_APPLICATION_CREDENTIALS is the path of service account file. # GOOGLE_APPLICATION_CREDENTIALS is the path of service account file.
if [ -z "${GOOGLE_APPLICATION_CREDENTIALS:-""}" ]; then if [ -n "${GOOGLE_APPLICATION_CREDENTIALS:-}" ]; then
echo "GOOGLE_APPLICATION_CREDENTIALS is not set"
exit 1
fi
# Activate gcloud service account.
gcloud auth activate-service-account --key-file "${GOOGLE_APPLICATION_CREDENTIALS}" --project="${PROJECT}" gcloud auth activate-service-account --key-file "${GOOGLE_APPLICATION_CREDENTIALS}" --project="${PROJECT}"
fi
cat /etc/os-release cat /etc/os-release
apt-get update apt-get update