diff options
author | C J Silverio <ceejceej@gmail.com> | 2017-02-14 22:40:43 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-02-24 02:56:11 +0300 |
commit | 148ee663740aa05877c64f16cdf18eba33fbc371 (patch) | |
tree | 7a6d38ade0fb73d09451c680bacdc2f34a60edff /bin | |
parent | 7ac9265c56b4d9eeaca6fcfb29513f301713e7bb (diff) |
npm-cli: add update-notifier & use it
The cli bin script now runs the update-notifier module after
it has decided we're running in a good node version. We do not
yet customize the output in any way.
Credit: @ceejbot
Fixes: #11473
PR-URL: https://github.com/npm/npm/pull/15774#pullrequestreview-23599057
Reviewed-By: @iarna
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/npm-cli.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js index 8c8fa8031..1f68099bf 100755 --- a/bin/npm-cli.js +++ b/bin/npm-cli.js @@ -25,6 +25,10 @@ unsupported.checkForUnsupportedNode() + var updater = require('update-notifier') + var pkg = require('../package.json') + updater({pkg: pkg}).notify({defer: true}) + var path = require('path') var npm = require('../lib/npm.js') var npmconf = require('../lib/config/core.js') |