Fix timing to call quitAndInstall()

This commit is contained in:
Yuya Ochiai
2018-08-02 01:22:08 +09:00
parent b8b64cf520
commit 79f2faadba

View File

@@ -83,10 +83,11 @@ function isUpdateApplicable(now, skippedVersion, updateInfo) {
} }
function downloadAndInstall() { function downloadAndInstall() {
autoUpdater.downloadUpdate().then(() => { autoUpdater.on('update-downloaded', () => {
global.willAppQuit = true; global.willAppQuit = true;
autoUpdater.quitAndInstall(); autoUpdater.quitAndInstall();
}); });
autoUpdater.downloadUpdate();
} }
function initialize(appState, mainWindow, notifyOnly = false) { function initialize(appState, mainWindow, notifyOnly = false) {