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:
Diffstat (limited to 'bin/npm-cli.js')
-rwxr-xr-xbin/npm-cli.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js
index a38009d27..e4da63c97 100755
--- a/bin/npm-cli.js
+++ b/bin/npm-cli.js
@@ -69,12 +69,15 @@
npm.command = 'help'
}
+ var isGlobalNpmUpdate = conf.global && ['install', 'update'].includes(npm.command) && npm.argv.includes('npm')
+
// now actually fire up npm and run the command.
// this is how to use npm programmatically:
conf._exit = true
npm.load(conf, function (er) {
if (er) return errorHandler(er)
if (
+ !isGlobalNpmUpdate &&
npm.config.get('update-notifier') &&
!unsupported.checkVersion(process.version).unsupported
) {