diff options
-rwxr-xr-x | bin/npm-cli.js | 3 |
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 ) { |