Fix MacOS error on shutdown (#1798)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-12-18 08:17:27 +02:00
1 parent 64888652c4
commit 804492251d
1 file changed
+5 -1
+5 -1
View File
@@ -4,7 +4,7 @@ import "../common/system-ca";
import "../common/prometheus-providers";
import * as Mobx from "mobx";
import * as LensExtensions from "../extensions/core-api";
import { app, dialog } from "electron";
import { app, dialog, powerMonitor } from "electron";
import { appName } from "../common/vars";
import path from "path";
import { LensProxy } from "./lens-proxy";
@@ -59,6 +59,10 @@ app.on("ready", async () => {
logger.info(`🚀 Starting Lens from "${workingDir}"`);
await shellSync();
powerMonitor.on("shutdown", () => {
app.exit();
});
const updater = new AppUpdater();
updater.start();