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:
authorJoshua Bennett <legodude17@users.noreply.github.com>2017-02-25 01:47:31 +0300
committerRebecca Turner <me@re-becca.org>2017-03-06 11:43:27 +0300
commit56ac249ef8ede1021f1bc62a0e4fe1e9ba556af2 (patch)
tree9e5f81d56eaaa0e38a0b8ec8f500e15185c01e7c /bin/npm-cli.js
parenta08189f3b0d0409db6d5774d3943d45be252c9b7 (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
Diffstat (limited to 'bin/npm-cli.js')
-rwxr-xr-xbin/npm-cli.js8
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')