diff options
Diffstat (limited to 'deps/npm/bin')
-rwxr-xr-x | deps/npm/bin/npm-cli.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js index 6f76b23828..705aa472e7 100755 --- a/deps/npm/bin/npm-cli.js +++ b/deps/npm/bin/npm-cli.js @@ -25,7 +25,6 @@ unsupported.checkForUnsupportedNode() - var path = require('path') var npm = require('../lib/npm.js') var npmconf = require('../lib/config/core.js') var errorHandler = require('../lib/utils/error-handler.js') @@ -37,7 +36,7 @@ // if npm is called as "npmg" or "npm_g", then // run in global mode. - if (path.basename(process.argv[1]).slice(-1) === 'g') { + if (process.argv[1][process.argv[1].length - 1] === 'g') { process.argv.splice(1, 1, 'npm', '-g') } |