I want the user to be able to control what happens upon 'update-available'
.
No matter what I do here, autoUpdater seems to proceed with downloading the update.
How can I make autoUpdater NOT proceed with the download?
autoUpdater
.on('error', function(error){
// [Log and show dialog] ...
})
.on('update-available', function(e) {
// [Confirmation dialog] ...
if (downloadConfirmation === 0) {
return;
}
})
.on('update-downloaded', function (event) {
// [Restart now? Dialog] ...
if (index === 1) return;
force_quit = true;
autoUpdater.quitAndInstall();
});
autoUpdater.checkForUpdates();