Updater debug utility

This commit is contained in:
Fedor Indutny 2021-06-30 14:27:18 -07:00 committed by GitHub
parent e7e9021e3f
commit 759ced3417
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 409 additions and 15 deletions

13
main.js
View file

@ -666,6 +666,18 @@ async function readyForUpdates() {
}
}
async function forceUpdate() {
try {
logger.info('starting force update');
await updater.force();
} catch (error) {
logger.error(
'Error during force update:',
error && error.stack ? error.stack : error
);
}
}
ipc.once('ready-for-updates', readyForUpdates);
const TEN_MINUTES = 10 * 60 * 1000;
@ -1404,6 +1416,7 @@ function setupMenu(options) {
platform,
setupAsNewDevice,
setupAsStandalone,
forceUpdate,
};
const template = createTemplate(menuOptions, locale.messages);
const menu = Menu.buildFromTemplate(template);