Skip to content

Commit

Permalink
Fix update-notifier false alarm. Fixes #372.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Mar 13, 2019
1 parent f26758e commit fe6e92a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/ncu
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ const ncu = require('../lib/npm-check-updates');
const pkg = require('../package.json');

// check if a new version of ncu is available and print an update notification
updateNotifier({pkg})
.notify({defer: false});
const notifier = updateNotifier({pkg})
if (notifier.update && notifier.update.latest !== pkg.version) {
notifier.notify({defer: false});
}

program
.description('[filter] is a list or regex of package names to check (all others will be ignored).')
Expand Down

0 comments on commit fe6e92a

Please sign in to comment.