Skip to content

Commit

Permalink
adding in user envs
Browse files Browse the repository at this point in the history
  • Loading branch information
colerogers committed Dec 13, 2022
1 parent f8e2975 commit 9b7072f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/emulator/functionsEmulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,7 @@ export class FunctionsEmulator implements EmulatorInstance {
await runtimeDelegate.validate();
logger.debug(`Building ${runtimeDelegate.name} source`);
await runtimeDelegate.build();
logger.debug(`Analyzing ${runtimeDelegate.name} backend spec`);
// Don't include user envs when parsing triggers, but we need some of the options for handling params

const firebaseConfig = this.getFirebaseConfig();
const environment = {
...this.getSystemEnvs(),
Expand All @@ -471,12 +470,13 @@ export class FunctionsEmulator implements EmulatorInstance {
projectId: this.args.projectId,
projectAlias: this.args.projectAlias,
};
const userEnvs = functionsEnv.loadUserEnvs(userEnvOpt);
const discoveredBuild = await runtimeDelegate.discoverBuild(runtimeConfig, environment);
const resolution = await resolveBackend(
discoveredBuild,
JSON.parse(firebaseConfig),
userEnvOpt,
environment
userEnvs
);
const discoveredBackend = resolution.backend;
const endpoints = backend.allEndpoints(discoveredBackend);
Expand Down

0 comments on commit 9b7072f

Please sign in to comment.