Skip to content

Commit 1bce66c

Browse files
committed
fix(deploy): deploying with service account
Deploying with service account was not possible, becouse no checks were made for GOOGLE_APPLICATION_CREDENTIALS env variable Fixes #3260
1 parent 89fd6e9 commit 1bce66c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/schematics/deploy/actions.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,16 @@ export default async function deploy(
388388
options: DeployBuilderOptions,
389389
firebaseToken?: string,
390390
) {
391-
if (!firebaseToken) {
391+
if (!firebaseToken && !process.env.GOOGLE_APPLICATION_CREDENTIALS) {
392392
await firebaseTools.login();
393393
const user = await firebaseTools.login({ projectRoot: context.workspaceRoot });
394394
console.log(`Logged into Firebase as ${user.email}.`);
395395
}
396396

397+
if(process.env.GOOGLE_APPLICATION_CREDENTIALS) {
398+
console.log(`Using Google Application Credentials.`);
399+
}
400+
397401
if (prerenderBuildTarget) {
398402

399403
const run = await context.scheduleTarget(

0 commit comments

Comments
 (0)