mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix auto-update exiting too fast (#2721)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
a6e916fa90
commit
253b3768f6
@ -4,7 +4,7 @@ import { isDevelopment, isPublishConfigured, isTestEnv } from "../common/vars";
|
|||||||
import { delay } from "../common/utils";
|
import { delay } from "../common/utils";
|
||||||
import { areArgsUpdateAvailableToBackchannel, AutoUpdateLogPrefix, broadcastMessage, onceCorrect, UpdateAvailableChannel, UpdateAvailableToBackchannel } from "../common/ipc";
|
import { areArgsUpdateAvailableToBackchannel, AutoUpdateLogPrefix, broadcastMessage, onceCorrect, UpdateAvailableChannel, UpdateAvailableToBackchannel } from "../common/ipc";
|
||||||
import { once } from "lodash";
|
import { once } from "lodash";
|
||||||
import { app, ipcMain } from "electron";
|
import { ipcMain } from "electron";
|
||||||
|
|
||||||
let installVersion: null | string = null;
|
let installVersion: null | string = null;
|
||||||
|
|
||||||
@ -17,7 +17,6 @@ function handleAutoUpdateBackChannel(event: Electron.IpcMainEvent, ...[arg]: Upd
|
|||||||
if (arg.now) {
|
if (arg.now) {
|
||||||
logger.info(`${AutoUpdateLogPrefix}: User chose to update now`);
|
logger.info(`${AutoUpdateLogPrefix}: User chose to update now`);
|
||||||
autoUpdater.quitAndInstall(true, true);
|
autoUpdater.quitAndInstall(true, true);
|
||||||
app.exit(); // this is needed for the installer not to fail on windows.
|
|
||||||
} else {
|
} else {
|
||||||
logger.info(`${AutoUpdateLogPrefix}: User chose to update on quit`);
|
logger.info(`${AutoUpdateLogPrefix}: User chose to update on quit`);
|
||||||
autoUpdater.autoInstallOnAppQuit = true;
|
autoUpdater.autoInstallOnAppQuit = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user