diff options
author | Matt Travi <github@travi.org> | 2018-06-29 00:44:43 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-06-29 00:44:43 +0300 |
commit | ce07933588ec2da1cc1980f93bdaa485d6028ae2 (patch) | |
tree | 12103a103981b200fbe7b3afb5efec62d1aed92a /bin | |
parent | 2d08866327013522fc5fbe61ed872b8f30e92775 (diff) |
config: Enable config for suppressing update-notifier (#20750)
PR-URL: https://github.com/npm/npm/pull/20750
Credit: @travi
Reviewed By: @zkat
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/npm-cli.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js index d7c14bc4b..b5cf4e312 100755 --- a/bin/npm-cli.js +++ b/bin/npm-cli.js @@ -74,7 +74,10 @@ conf._exit = true npm.load(conf, function (er) { if (er) return errorHandler(er) - if (!unsupported.checkVersion(process.version).unsupported) { + if ( + npm.config.get('update-notifier') && + !unsupported.checkVersion(process.version).unsupported + ) { const pkg = require('../package.json') let notifier = require('update-notifier')({pkg}) if ( |