Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dialog.showMessageBox(win, messageBoxOptions, (responseIndex) => {
if (responseIndex === messageBoxOptions.defaultId) {
autoUpdater.quitAndInstall()
}
})
})
ipcMain.on('autoUpdateAccepted', () => {
appState.autoUpdateAccepted = true;
autoUpdater.quitAndInstall();
});
}, (buttonIndex) => {
if (buttonIndex === 0) {
const isSilent = true;
const isForceRunAfter = true;
autoUpdater.quitAndInstall(isSilent, isForceRunAfter);
}
})
}
this.on(EVENTS.APP.UPDATE, () => {
if (this.hasUpdate) {
this.logger.info('Updating now!');
if (is.linux() || is.macOS()) {
shell.openExternal('http://auryo.com#downloads');
} else {
autoUpdater.quitAndInstall(true, true);
}
}
});
}
ipc.on('start-update', () => {
autoUpdater.quitAndInstall();
});
setTimeout(function() {
autoUpdater.quitAndInstall();
}, 5000);
});
public quitAndInstall = () => {
autoUpdater.quitAndInstall();
}
ipcMain.on('quitAndUpdate', () => autoUpdater.quitAndInstall());