Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Travi <github@travi.org>2018-06-29 00:44:43 +0300
committerKat Marchán <kzm@zkat.tech>2018-06-29 00:44:43 +0300
commitce07933588ec2da1cc1980f93bdaa485d6028ae2 (patch)
tree12103a103981b200fbe7b3afb5efec62d1aed92a /bin/npm-cli.js
parent2d08866327013522fc5fbe61ed872b8f30e92775 (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/npm-cli.js')
-rwxr-xr-xbin/npm-cli.js5
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 (