1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-13 22:12:50 +02:00

Tweak and error handling on auto-update

This commit is contained in:
Laurent Cozic
2018-01-31 19:10:45 +00:00
parent 42c78264fb
commit 551fabdfc9

View File

@@ -18,7 +18,7 @@ autoUpdater.on('update-available', () => {
dialog.showMessageBox({
type: 'info',
message: _('An update is available, do you want to update now?'),
buttons: ['Sure', 'No']
buttons: [_('Yes'), _('No')]
}, (buttonIndex) => {
if (buttonIndex === 0) {
try {
@@ -61,7 +61,12 @@ function checkForUpdates(inBackground, logFilePath) {
checkInBackground_ = inBackground;
autoUpdater.checkForUpdates()
try {
autoUpdater.checkForUpdates()
} catch (error) {
autoUpdateLogger_.error(error);
if (!checkInBackground_) dialog.showErrorBox(_('Error'), error.message);
}
}
module.exports.checkForUpdates = checkForUpdates