You've already forked joplin
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:
@@ -18,7 +18,7 @@ autoUpdater.on('update-available', () => {
|
|||||||
dialog.showMessageBox({
|
dialog.showMessageBox({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: _('An update is available, do you want to update now?'),
|
message: _('An update is available, do you want to update now?'),
|
||||||
buttons: ['Sure', 'No']
|
buttons: [_('Yes'), _('No')]
|
||||||
}, (buttonIndex) => {
|
}, (buttonIndex) => {
|
||||||
if (buttonIndex === 0) {
|
if (buttonIndex === 0) {
|
||||||
try {
|
try {
|
||||||
@@ -61,7 +61,12 @@ function checkForUpdates(inBackground, logFilePath) {
|
|||||||
|
|
||||||
checkInBackground_ = inBackground;
|
checkInBackground_ = inBackground;
|
||||||
|
|
||||||
autoUpdater.checkForUpdates()
|
try {
|
||||||
|
autoUpdater.checkForUpdates()
|
||||||
|
} catch (error) {
|
||||||
|
autoUpdateLogger_.error(error);
|
||||||
|
if (!checkInBackground_) dialog.showErrorBox(_('Error'), error.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.checkForUpdates = checkForUpdates
|
module.exports.checkForUpdates = checkForUpdates
|
Reference in New Issue
Block a user