summaryrefslogtreecommitdiff
path: root/deps/npm/bin/npm
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2015-09-04 14:47:14 -0700
committerRod Vagg <rod@vagg.org>2015-09-06 21:38:09 +1000
commitd15ba80d6f7a473a70081768500260429ecb6218 (patch)
treed83559d4277c56eab5fffb986dd1e4ec8db94a4b /deps/npm/bin/npm
parentb4f1711a629251f6aab7615907fe7358881e0648 (diff)
downloadandroid-node-v8-d15ba80d6f7a473a70081768500260429ecb6218.tar.gz
android-node-v8-d15ba80d6f7a473a70081768500260429ecb6218.tar.bz2
android-node-v8-d15ba80d6f7a473a70081768500260429ecb6218.zip
deps: upgrade to npm 2.14.2
PR-URL: https://github.com/nodejs/node/pull/2696 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'deps/npm/bin/npm')
-rwxr-xr-xdeps/npm/bin/npm21
1 files changed, 17 insertions, 4 deletions
diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm
index d020ccfe7c..45e8e41031 100755
--- a/deps/npm/bin/npm
+++ b/deps/npm/bin/npm
@@ -7,8 +7,21 @@ case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
-if [ -x "$basedir/node.exe" ]; then
- "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
-else
- node "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
+NODE_EXE="$basedir/node.exe"
+if ! [ -x "$NODE_EXE" ]; then
+ NODE_EXE=node
fi
+
+NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js"
+
+case `uname` in
+ *CYGWIN*)
+ NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
+ NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
+ if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then
+ NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
+ fi
+ ;;
+esac
+
+"$NODE_EXE" "$NPM_CLI_JS" "$@"