unify update check into a single job
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
exports = module.exports = {
|
||||
checkAppUpdates: checkAppUpdates,
|
||||
checkBoxUpdates: checkBoxUpdates,
|
||||
checkForUpdates,
|
||||
|
||||
getUpdateInfo: getUpdateInfo,
|
||||
resetUpdateInfo: resetUpdateInfo,
|
||||
resetAppUpdateInfo: resetAppUpdateInfo,
|
||||
getUpdateInfo,
|
||||
resetUpdateInfo,
|
||||
resetAppUpdateInfo,
|
||||
|
||||
_setUpdateInfo: setUpdateInfo
|
||||
};
|
||||
@@ -171,3 +170,19 @@ function checkBoxUpdates(options, callback) {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function checkForUpdates(options, callback) {
|
||||
assert.strictEqual(typeof options, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
checkBoxUpdates(options, function (error) {
|
||||
if (error) debug('checkForUpdates: error checking for box updates:', error);
|
||||
|
||||
checkAppUpdates(options, function (error) {
|
||||
if (error) debug('checkForUpdates: error checking for app updates:', error);
|
||||
|
||||
callback();
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user