1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix macos shutdown

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-12-17 20:08:13 +02:00
parent 64888652c4
commit 495cc5fc53

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";
@ -55,6 +55,10 @@ app.on("second-instance", () => {
windowManager?.ensureMainWindow();
});
powerMonitor.on("shutdown", () => {
app.exit();
});
app.on("ready", async () => {
logger.info(`🚀 Starting Lens from "${workingDir}"`);
await shellSync();