diff options
author | isaacs <i@izs.me> | 2011-10-18 23:12:06 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-10-18 23:12:06 +0400 |
commit | 4b51fd8d53a994aa225db9b17664c7887e30c8fc (patch) | |
tree | 600598fd15cb5b1bf0249d83ff5661e2eea4d181 /scripts | |
parent | 3603372b4a4016f0a399860ea57192387d6d0f61 (diff) |
Fail faster in cases like #1566
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/install.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/install.sh b/scripts/install.sh index 4ca9a644e..39d0f5e66 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -167,11 +167,18 @@ url=`(curl -SsL --cacert "$cacert" https://registry.npmjs.org/npm/$t; echo "") \ | sed -e 's/".*$//'` ret=$? +if [ "x$url" = "x" ]; then + ret=125 +fi if [ $ret -ne 0 ]; then - echo "Failed to get tarball url" >&2 + echo "Failed to get tarball url for npm/$t" >&2 + (curl -SsL -k https://registry.npmjs.org/npm/$t; echo "") \ + | sed -e 's/^.*tarball":"//' \ + | sed -e 's/".*$//' exit $ret fi + echo "fetching: $url" >&2 cd "$TMP" \ |