diff --git a/dev-packages/application-manager/src/generator/backend-generator.ts b/dev-packages/application-manager/src/generator/backend-generator.ts index c7f526095946b..d48e9484aa669 100644 --- a/dev-packages/application-manager/src/generator/backend-generator.ts +++ b/dev-packages/application-manager/src/generator/backend-generator.ts @@ -90,6 +90,7 @@ module.exports = Promise.resolve()${this.compileElectronMainModuleImports(electr if (reason) { console.error(reason); } + app.quit(); }); `; } diff --git a/packages/core/src/electron-main/electron-main-application.ts b/packages/core/src/electron-main/electron-main-application.ts index bf43b2cb025a4..2b455fec20391 100644 --- a/packages/core/src/electron-main/electron-main-application.ts +++ b/packages/core/src/electron-main/electron-main-application.ts @@ -507,6 +507,9 @@ export class ElectronMainApplication { backendProcess.on('error', error => { reject(error); }); + backendProcess.on('exit', () => { + reject(new Error('backend process exited')); + }) app.on('quit', () => { // Only issue a kill signal if the backend process is running. // eslint-disable-next-line no-null/no-null