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:
authorRebecca Turner <me@re-becca.org>2016-10-11 00:24:09 +0300
committerRebecca Turner <me@re-becca.org>2016-10-20 14:03:54 +0300
commitbdeac3e0fb226e4777d4be5cd3c3bec8231c8044 (patch)
treeb1596db2a5f287a3641d7a7a9b0c65330bb2cf31 /bin/npm-cli.js
parentc246a75ac8697f4ca11d316b7e7db5f24af7972b (diff)
npm: Detect unsupported Node.js versions and warn
Also error on really old versions where we know we can't work. Credit: @iarna Reviewed-By: @othiym23 Reviewed-By: @zkat PR-URL: https://github.com/npm/npm/pull/14230
Diffstat (limited to 'bin/npm-cli.js')
-rwxr-xr-xbin/npm-cli.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js
index 55fa054d6..8c8fa8031 100755
--- a/bin/npm-cli.js
+++ b/bin/npm-cli.js
@@ -16,11 +16,15 @@
process.title = 'npm'
+ var unsupported = require('../lib/utils/unsupported.js')
+ unsupported.checkForBrokenNode()
+
var log = require('npmlog')
log.pause() // will be unpaused when config is loaded.
-
log.info('it worked if it ends with', 'ok')
+ unsupported.checkForUnsupportedNode()
+
var path = require('path')
var npm = require('../lib/npm.js')
var npmconf = require('../lib/config/core.js')