google-auth-library-python icon indicating copy to clipboard operation
google-auth-library-python copied to clipboard

fix: detect correct auth when ADC env var is set but empty

Open mbrancato opened this issue 2 years ago • 1 comments

Treat empty strings as if the env var was not set. This fixes an issue where an environment variable for GOOGLE_APPLICATION_CREDENTIALS is set, but it empty. Because the default sentinel is None, the auth library attempts to load this file. Some systems can set or update an env var, but not unset an env var (e.g. Docker).

Fixes: https://github.com/googleapis/python-pubsub/issues/983

mbrancato avatar Aug 22 '23 16:08 mbrancato

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Aug 22 '23 16:08 google-cla[bot]