Skip to content

Commit

Permalink
Emulators:exec should rethrow errors from emulator startup (#7976)
Browse files Browse the repository at this point in the history
  • Loading branch information
joehan authored Nov 21, 2024
1 parent 0f45706 commit c130377
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Fixes an issue where `emulators:exec` would return a 0 error code when emulators failed to start. (#7974)
- Added `--import` and `emulators:export` support to the Data Connect emulator.
- Added `firebase.json#emulators.dataconnect.dataDir`. When set, Data Connect data will be persisted to the configured directory between emulator runs.
3 changes: 2 additions & 1 deletion src/emulator/commandUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,9 @@ export async function emulatorExec(script: string, options: any): Promise<void>
await sendVSCodeMessage({ message: VSCODE_MESSAGE.EMULATORS_STARTED });
exitCode = await runScript(script, extraEnv);
await controller.onExit(options);
} catch {
} catch (err: unknown) {
await sendVSCodeMessage({ message: VSCODE_MESSAGE.EMULATORS_START_ERRORED });
throw err;
} finally {
await controller.cleanShutdown();
}
Expand Down

0 comments on commit c130377

Please sign in to comment.