diff options
author | isaacs <i@izs.me> | 2014-02-16 20:43:16 -0800 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-02-17 19:37:33 -0800 |
commit | 217bb0c9641f8b999f8a07d5fd9141e8c6cd1164 (patch) | |
tree | fbdeb1cddc40518d30381770499934e4de5a699d /deps/npm/scripts | |
parent | 829a9b8cba0680f1d451551e12491e7b0e1ea92f (diff) | |
download | android-node-v8-217bb0c9641f8b999f8a07d5fd9141e8c6cd1164.tar.gz android-node-v8-217bb0c9641f8b999f8a07d5fd9141e8c6cd1164.tar.bz2 android-node-v8-217bb0c9641f8b999f8a07d5fd9141e8c6cd1164.zip |
npm: upgrade to 1.4.3
Diffstat (limited to 'deps/npm/scripts')
-rwxr-xr-x | deps/npm/scripts/install.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/deps/npm/scripts/install.sh b/deps/npm/scripts/install.sh index 7a0a45f5dd..74840459e8 100755 --- a/deps/npm/scripts/install.sh +++ b/deps/npm/scripts/install.sh @@ -17,7 +17,16 @@ if [ "x$0" = "xsh" ]; then # on some systems, you can just do cat>npm-install.sh # which is a bit cuter. But on others, &1 is already closed, # so catting to another script file won't do anything. - curl -s https://npmjs.org/install.sh > npm-install-$$.sh + # Follow Location: headers, and fail on errors + curl -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh + ret=$? + if [ $ret -eq 0 ]; then + (exit 0) + else + rm npm-install-$$.sh + echo "Failed to download script" >&2 + exit $ret + fi sh npm-install-$$.sh ret=$? rm npm-install-$$.sh |