auto-updater: less intrusive error handling

This commit is contained in:
Guillermo Rauch 2016-07-08 05:48:42 -07:00
parent f7a6b02d4f
commit 2eb878bebe

View file

@ -1,5 +1,6 @@
const { autoUpdater, dialog } = require('electron');
const { autoUpdater } = require('electron');
const { version } = require('./package');
const notify = require('./notify');
const ms = require('ms');
const FEED_URL = 'https://hyperterm-updates.now.sh/update/osx';
@ -7,11 +8,7 @@ let isInit = false;
function init () {
autoUpdater.on('error', (err, msg) => {
dialog.showMessageBox({
title: 'title',
message: 'Auto updater error: ' + msg + ' (' + err.stack + ')',
buttons: ['Ok']
});
notify('Error fetching updates', msg + ' (' + err.stack + ')');
});
autoUpdater.setFeedURL(`${FEED_URL}/${version}`);