From bdeac3e0fb226e4777d4be5cd3c3bec8231c8044 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Mon, 10 Oct 2016 14:24:09 -0700 Subject: 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 --- bin/npm-cli.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin/npm-cli.js') 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') -- cgit v1.2.3