diff options
author | Rebecca Turner <me@re-becca.org> | 2016-10-11 00:24:09 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2016-10-20 14:03:54 +0300 |
commit | bdeac3e0fb226e4777d4be5cd3c3bec8231c8044 (patch) | |
tree | b1596db2a5f287a3641d7a7a9b0c65330bb2cf31 /bin | |
parent | c246a75ac8697f4ca11d316b7e7db5f24af7972b (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')
-rwxr-xr-x | bin/npm-cli.js | 6 |
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') |