cloud-functions-emulator icon indicating copy to clipboard operation
cloud-functions-emulator copied to clipboard

GCLOUD_PROJECT is favored over GOOGLE_CLOUD_PROJECT in detectProjectId.js

Open joshunger opened this issue 7 years ago • 0 comments

Steps to reproduce

  1. Open https://github.com/GoogleCloudPlatform/cloud-functions-emulator/blob/master/src/utils/detectProjectId.js
  2. View the code
  if (process.env.GCLOUD_PROJECT) {
    return process.env.GCLOUD_PROJECT;
  }
  if (process.env.GOOGLE_CLOUD_PROJECT) {
    return process.env.GOOGLE_CLOUD_PROJECT;
  }

I thought GCLOUD_PROJECT is deprecated? Should GOOGLE_CLOUD_PROJECT be first in this check? Can you share documentation on these two variables? Thanks.

joshunger avatar Mar 24 '18 16:03 joshunger