diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb2d..d91940bddbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +Inject an environment variable in the node functions emulator to tell the google-gax SDK not to look for the metadata service. (#6860) diff --git a/src/emulator/functionsEmulator.ts b/src/emulator/functionsEmulator.ts index d83e8c23f74..0cb50c96588 100644 --- a/src/emulator/functionsEmulator.ts +++ b/src/emulator/functionsEmulator.ts @@ -1349,6 +1349,7 @@ export class FunctionsEmulator implements EmulatorInstance { cwd: backend.functionsDir, env: { node: backend.bin, + METADATA_SERVER_DETECTION: "none", ...process.env, ...envs, PORT: socketPath, @@ -1451,7 +1452,6 @@ export class FunctionsEmulator implements EmulatorInstance { /** * Gets the address of a running emulator, either from explicit args or by * consulting the emulator registry. - * * @param emulator */ private getEmulatorInfo(emulator: Emulators): EmulatorInfo | undefined {