updater: async'ify
This commit is contained in:
+4
-2
@@ -190,14 +190,16 @@ function autoupdatePatternChanged(pattern, tz) {
|
||||
// do box before app updates. for the off chance that the box logic fixes some app update logic issue
|
||||
if (updateInfo.box && !updateInfo.box.unstable) {
|
||||
debug('Starting box autoupdate to %j', updateInfo.box);
|
||||
await safe(updater.updateToLatest({ skipBackup: false }, auditSource.CRON));
|
||||
const [error] = await safe(updater.updateToLatest({ skipBackup: false }, auditSource.CRON));
|
||||
if (error) debug(`Failed to box autoupdate: ${error.message}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const appUpdateInfo = _.omit(updateInfo, 'box');
|
||||
if (Object.keys(appUpdateInfo).length > 0) {
|
||||
debug('Starting app update to %j', appUpdateInfo);
|
||||
await safe(apps.autoupdateApps(appUpdateInfo, auditSource.CRON));
|
||||
const [error] = await safe(apps.autoupdateApps(appUpdateInfo, auditSource.CRON));
|
||||
if (error) debug(`Failed to app autoupdate: ${error.message}`);
|
||||
} else {
|
||||
debug('No app auto updates available');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user