Skip to content

Commit 07d60b2

Browse files
SouravSourav
authored andcommitted
set update config if update is available
1 parent bc94c60 commit 07d60b2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bin/commands/runs.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,14 @@ module.exports = function run(args, rawArgs) {
324324
utils.sendUsageReport(bsJsonData, args, err.message, Constants.messageTypes.ERROR, utils.getErrorCodeFromErr(err), null, rawArgs);
325325
process.exitCode = Constants.ERROR_EXIT_CODE;
326326
}).finally(function(){
327-
updateNotifier({
327+
const notifier = updateNotifier({
328328
pkg,
329329
updateCheckInterval: 1000 * 60 * 60 * 24 * 7,
330-
}).notify({isGlobal: true});
330+
});
331+
332+
if (notifier.update && notifier.update.current !== notifier.update.latest) {
333+
notifier.config.set('update', notifier.update);
334+
notifier.notify({isGlobal: true});
335+
}
331336
});
332337
}

0 commit comments

Comments
 (0)