Skip to content

Commit 0ef83e2

Browse files
committed
move auth after project options
1 parent c180607 commit 0ef83e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/init/features/project.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ export async function doSetup(setup: any, config: any, options: any): Promise<vo
4949
}
5050
const projectFromRcFile = setup.rcfile?.projects?.default;
5151
if (projectFromRcFile) {
52+
await requireAuth(options);
5253
await usingProject(setup, config, projectFromRcFile as string, ".firebaserc");
5354
return;
5455
}
5556
const projectEnvVar = utils.envOverride("FIREBASE_PROJECT", "");
5657
if (projectEnvVar) {
5758
// If env var $FIREBASE_PROJECT is set, try to fetch that project.
5859
// This is used in some shell scripts e.g. under https://firebase.tools/.
60+
await requireAuth(options);
5961
await usingProject(setup, config, projectEnvVar, "$FIREBASE_PROJECT");
6062
return;
6163
}

0 commit comments

Comments
 (0)