Skip to content

Commit d7ba65e

Browse files
SouravSourav
authored andcommitted
added logic to check for updates on first run
1 parent 07d60b2 commit d7ba65e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/commands/runs.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ module.exports = function run(args, rawArgs) {
328328
pkg,
329329
updateCheckInterval: 1000 * 60 * 60 * 24 * 7,
330330
});
331+
332+
if (!notifier.disabled && Date.now() - notifier.config.get('lastUpdateCheck') < 50) {
333+
notifier.config.set('lastUpdateCheck', 0);
334+
notifier.check();
335+
}
331336

332337
if (notifier.update && notifier.update.current !== notifier.update.latest) {
333338
notifier.config.set('update', notifier.update);

0 commit comments

Comments
 (0)