diff --git a/auto-updater.js b/auto-updater.js index 3d3c12b6..ef16ee8d 100644 --- a/auto-updater.js +++ b/auto-updater.js @@ -6,8 +6,11 @@ const FEED_URL = 'https://nuts-serve-nxchetcjig.now.sh/update/osx'; module.exports = function AutoUpdater (rpc) { autoUpdater.on('error', (err, msg) => { - dialog.showMessageBox({title: 'title', message: JSON.stringify(err), buttons: ['Ok error']}); - dialog.showMessageBox({title: 'title', message: JSON.stringify(msg), buttons: ['Ok error']}); + dialog.showMessageBox({ + title: 'title', + message: 'Auto updater error: ' + msg + ' (' + err.stack + ')', + buttons: ['Ok'] + }); }); autoUpdater.setFeedURL(`${FEED_URL}/${version}`); @@ -16,14 +19,6 @@ module.exports = function AutoUpdater (rpc) { rpc.emit('update-available'); }); - autoUpdater.once('update-available', () => { - dialog.showMessageBox({title: 'title', message: 'update-available', buttons: ['Ok']}); - }); - - autoUpdater.once('update-not-available', () => { - dialog.showMessageBox({title: 'title', message: 'update-not-available', buttons: ['Ok']}); - }); - rpc.once('quit-and-install', () => { autoUpdater.quitAndInstall(); });