Skip to content

Commit

Permalink
Handle auto update errors (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jun 28, 2019
1 parent 52cd6aa commit 6695f72
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,24 +230,12 @@ class Application {
return;
}
var autoUpdater = updater.autoUpdater;
/* autoUpdater.autoDownload = false;
autoUpdater.on('update-available', () => {
var owner = electron.BrowserWindow.getFocusedWindow();
var messageBoxOptions = {
icon: path.join(__dirname, 'icon.png'),
title: ' ',
message: 'A new version of ' + electron.app.getName() + ' is available.',
detail: 'Click \'Download and Install\' to download the update and automatically install it on exit.',
buttons: ['Download and Install', 'Remind Me Later'],
defaultId: 0,
cancelId: 1
};
if (electron.dialog.showMessageBox(owner, messageBoxOptions) == 0) {
autoUpdater.autoDownload = true;
autoUpdater.checkForUpdatesAndNotify();
}
}); */
autoUpdater.checkForUpdates();
var promise = autoUpdater.checkForUpdates();
if (promise) {
promise.catch((error) => {
console.log(error.message);
});
}
}

get package() {
Expand Down

0 comments on commit 6695f72

Please sign in to comment.