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

crash and report to file, not to user

Signed-off-by: Gabriel <gaccettola@mirantis.com>
This commit is contained in:
Gabriel 2023-03-31 18:48:45 +02:00
parent 37c92c8fd1
commit 59bfef824a

View File

@ -8,6 +8,7 @@ import clusterManagerInjectable from "./cluster/manager.injectable";
import loggerInjectable from "../common/logger.injectable"; import loggerInjectable from "../common/logger.injectable";
import closeAllWindowsInjectable from "./start-main-application/lens-window/hide-all-windows/close-all-windows.injectable"; import closeAllWindowsInjectable from "./start-main-application/lens-window/hide-all-windows/close-all-windows.injectable";
import emitAppEventInjectable from "../common/app-event-bus/emit-event.injectable"; import emitAppEventInjectable from "../common/app-event-bus/emit-event.injectable";
const { app, crashReporter } = require('electron');
const stopServicesAndExitAppInjectable = getInjectable({ const stopServicesAndExitAppInjectable = getInjectable({
id: "stop-services-and-exit-app", id: "stop-services-and-exit-app",
@ -20,6 +21,9 @@ const stopServicesAndExitAppInjectable = getInjectable({
const emitAppEvent = di.inject(emitAppEventInjectable); const emitAppEvent = di.inject(emitAppEventInjectable);
return () => { return () => {
logger.info("CRASHREPORTER:START");
logger.info(app.getPath('crashDumps'))
crashReporter.start({ submitURL: '', uploadToServer: false })
emitAppEvent({ name: "service", action: "close" }); emitAppEvent({ name: "service", action: "close" });
closeAllWindows(); closeAllWindows();
clusterManager.stop(); clusterManager.stop();