googleapis / google-auth-library-ruby

Google Auth Library for Ruby
Apache License 2.0
471 stars 254 forks source link

fix: Get the project_id from gcloud #479

Open JamshedVesuna opened 9 months ago

JamshedVesuna commented 9 months ago

I think the spirit of https://github.com/googleapis/google-auth-library-ruby/commit/990250345d6af31de1066c08c0b3b42692ae263c was to prevent gcloud from popping out of the console and hanging. Unfortunately, this will always close the subprocess and return an empty string.

This causes downstream issues, for example when initializing a new BigQuery client [0] that relies on the credential to carry the project_id.

Adding --quiet will disable interactive prompts and either attempt to use defaults or error.

  1. https://github.com/googleapis/google-cloud-ruby/blob/main/google-cloud-bigquery/lib/google/cloud/bigquery.rb
google-cla[bot] commented 9 months ago

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.

JamshedVesuna commented 8 months ago

Hi, is it possible to get a review for this? I have signed the Contributor License Agreement. Thank you! @dazuma