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() {
autoUpdater.downloadUpdate().then(() => {
autoUpdater.on('update-downloaded', () => {
global.willAppQuit = true;
autoUpdater.quitAndInstall();
});
autoUpdater.downloadUpdate();
}
function initialize(appState, mainWindow, notifyOnly = false) {