diff options
author | isaacs <i@izs.me> | 2014-02-16 20:43:16 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-02-16 20:43:16 -0800 |
commit | ec2fc4ca4d3eacaa3dc1db1673169b89233b9823 (patch) | |
tree | 0aa8a647e5111653bdf9c122182be93bf8823c7b /deps/npm/scripts/install.sh | |
parent | 86b8d84811484763b251b9a8a2b9e673964ea6b5 (diff) | |
download | node-npm-v1.4.3.tar.gz |
npm: upgrade to 1.4.3npm-v1.4.3
Diffstat (limited to 'deps/npm/scripts/install.sh')
-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 7a0a45f5d..74840459e 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 |