mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add more logging to the quit and install sequence
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
c4046f657a
commit
eb48bf1ab3
@ -28,7 +28,6 @@ import { once } from "lodash";
|
||||
import { app, ipcMain } from "electron";
|
||||
import { nextUpdateChannel } from "./utils/update-channel";
|
||||
import { UserStore } from "../common/user-store";
|
||||
import { WindowManager } from "./window-manager";
|
||||
|
||||
let installVersion: null | string = null;
|
||||
|
||||
@ -42,8 +41,10 @@ function handleAutoUpdateBackChannel(event: Electron.IpcMainEvent, ...[arg]: Upd
|
||||
logger.info(`${AutoUpdateLogPrefix}: User chose to update now`);
|
||||
setImmediate(() => {
|
||||
app.removeAllListeners("window-all-closed");
|
||||
WindowManager.getInstance().destroy();
|
||||
console.log("Trying to quit and install");
|
||||
autoUpdater.quitAndInstall(true, true);
|
||||
console.log("Trying to quit");
|
||||
app.quit();
|
||||
});
|
||||
} else {
|
||||
logger.info(`${AutoUpdateLogPrefix}: User chose to update on quit`);
|
||||
|
||||
@ -42,7 +42,7 @@ import type { LensExtensionId } from "../extensions/lens-extension";
|
||||
import { installDeveloperTools } from "./developer-tools";
|
||||
import { LensProtocolRouterMain } from "./protocol-handler";
|
||||
import { disposer, getAppVersion, getAppVersionFromProxyServer, storedKubeConfigFolder } from "../common/utils";
|
||||
import { bindBroadcastHandlers, ipcMainOn } from "../common/ipc";
|
||||
import { AutoUpdateLogPrefix, bindBroadcastHandlers, ipcMainOn } from "../common/ipc";
|
||||
import { startUpdateChecking } from "./app-updater";
|
||||
import { IpcRendererNavigationEvents } from "../renderer/navigation/events";
|
||||
import { pushCatalogToRenderer } from "./catalog-pusher";
|
||||
@ -290,7 +290,10 @@ app.on("activate", (event, hasVisibleWindows) => {
|
||||
*/
|
||||
let blockQuit = !isIntegrationTesting;
|
||||
|
||||
autoUpdater.on("before-quit-for-update", () => blockQuit = false);
|
||||
autoUpdater.on("before-quit-for-update", () => {
|
||||
logger.info(`${AutoUpdateLogPrefix}: disabling quit blocking`);
|
||||
blockQuit = false;
|
||||
});
|
||||
|
||||
app.on("will-quit", (event) => {
|
||||
// This is called when the close button of the main window is clicked
|
||||
|
||||
Loading…
Reference in New Issue
Block a user