From d8a24e1abde4df05d9665781e23c26f8631adeb5 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Wed, 20 Apr 2022 00:47:13 -0500 Subject: [PATCH] Rename script environment variable to GOOGLE_APPLICATION_CREDENTIALS_DEV (and _PROD) --- functions/src/scripts/script-init.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/src/scripts/script-init.ts b/functions/src/scripts/script-init.ts index 965dd670..d3acbc66 100644 --- a/functions/src/scripts/script-init.ts +++ b/functions/src/scripts/script-init.ts @@ -6,7 +6,7 @@ import * as admin from 'firebase-admin' // First, generate a private key from the Google service account management page: // Prod: https://console.firebase.google.com/u/0/project/mantic-markets/settings/serviceaccounts/adminsdk // Dev: https://console.firebase.google.com/u/0/project/dev-mantic-markets/settings/serviceaccounts/adminsdk -// Then set GOOGLE_ACCOUNT_CREDENTIALS_PROD or GOOGLE_ACCOUNT_CREDENTIALS_DEV to the path of the key. +// Then set GOOGLE_APPLICATION_CREDENTIALS_PROD or GOOGLE_APPLICATION_CREDENTIALS_DEV to the path of the key. // Then, to run a script, make sure you are pointing at the Firebase you intend to: // $ firebase use dev (or prod) @@ -55,7 +55,7 @@ export const initAdmin = (env?: string) => { ) return } - const envVar = `GOOGLE_AUTHENTICATION_CREDENTIALS_${env.toUpperCase()}` + const envVar = `GOOGLE_APPLICATION_CREDENTIALS_${env.toUpperCase()}` const keyPath = process.env[envVar] if (keyPath == null) { console.error(