Skip to content

Commit

Permalink
Merge branch 'master' into ss-emulators-auto-download
Browse files Browse the repository at this point in the history
  • Loading branch information
samtstern committed Jun 24, 2019
2 parents c6a4330 + 6875174 commit 4e8103b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Fixes a bug where the functions emulator did not work with `firebase-functions` versions `3.x.x`.
* Make the Functions emulator automatically point to the RTDB emulator when running.
* Auto-download Firestore and RTDB emulators when using `emulators:start`.
* Fixes issue where the functions runtime would not always exit on success (#1346).
* Auto-download Firestore and RTDB emulators when using `emulators:start`.
12 changes: 8 additions & 4 deletions src/emulator/functionsEmulatorRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,12 @@ async function main(): Promise<void> {
}

if (require.main === module) {
main().catch((err) => {
new EmulatorLog("FATAL", "runtime-error", err.stack ? err.stack : err).log();
process.exit();
});
main()
.then(() => {
process.exit(0);
})
.catch((err) => {
new EmulatorLog("FATAL", "runtime-error", err.stack ? err.stack : err).log();
process.exit(1);
});
}

0 comments on commit 4e8103b

Please sign in to comment.