From ce07933588ec2da1cc1980f93bdaa485d6028ae2 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Thu, 28 Jun 2018 16:44:43 -0500 Subject: config: Enable config for suppressing update-notifier (#20750) PR-URL: https://github.com/npm/npm/pull/20750 Credit: @travi Reviewed By: @zkat --- bin/npm-cli.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/npm-cli.js') 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 ( -- cgit v1.2.3