Fix auto-update exiting too fast (#2721)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2021-05-07 09:26:26 +03:00
1 parent a6e916fa90
commit 253b3768f6
1 file changed
+1 -2
+1 -2
View File
@@ -4,7 +4,7 @@ import { isDevelopment, isPublishConfigured, isTestEnv } from "../common/vars";
import { delay } from "../common/utils";
import { areArgsUpdateAvailableToBackchannel, AutoUpdateLogPrefix, broadcastMessage, onceCorrect, UpdateAvailableChannel, UpdateAvailableToBackchannel } from "../common/ipc";
import { once } from "lodash";
import { app, ipcMain } from "electron";
import { ipcMain } from "electron";
let installVersion: null | string = null;
@@ -17,7 +17,6 @@ function handleAutoUpdateBackChannel(event: Electron.IpcMainEvent, ...[arg]: Upd
if (arg.now) {
logger.info(`${AutoUpdateLogPrefix}: User chose to update now`);
autoUpdater.quitAndInstall(true, true);
app.exit(); // this is needed for the installer not to fail on windows.
} else {
logger.info(`${AutoUpdateLogPrefix}: User chose to update on quit`);
autoUpdater.autoInstallOnAppQuit = true;