diff options
author | Joshua Bennett <legodude17@users.noreply.github.com> | 2017-02-25 01:47:31 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-03-06 11:43:27 +0300 |
commit | 56ac249ef8ede1021f1bc62a0e4fe1e9ba556af2 (patch) | |
tree | 9e5f81d56eaaa0e38a0b8ec8f500e15185c01e7c | |
parent | a08189f3b0d0409db6d5774d3943d45be252c9b7 (diff) |
cli: only use `update-notifier` on supported versions
Fixes: #15855
PR-URL: https://github.com/npm/npm/pull/15864
Credit: @legodude17
Reviewed-By: @iarna
-rwxr-xr-x | bin/npm-cli.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js index 1f68099bf..ce89eaacc 100755 --- a/bin/npm-cli.js +++ b/bin/npm-cli.js @@ -25,9 +25,11 @@ unsupported.checkForUnsupportedNode() - var updater = require('update-notifier') - var pkg = require('../package.json') - updater({pkg: pkg}).notify({defer: true}) + if (!unsupported.checkVersion(process.version).unsupported) { + var updater = require('update-notifier') + var pkg = require('../package.json') + updater({pkg: pkg}).notify({defer: true}) + } var path = require('path') var npm = require('../lib/npm.js') |