diff --git a/electron/main.ts b/electron/main.ts index 4d83ea6a4..bb55464d6 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -141,3 +141,10 @@ app.whenReady().then(() => { internalLog(`Cockpit version: ${app.getVersion()}`) }) + +app.on('before-quit', () => { + // @ts-ignore: import.meta.env does not exist in the types + if (import.meta.env.DEV) { + app.exit() + } +})