Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/install.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index 39d0f5e66..85d6d4876 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -169,12 +169,17 @@ url=`(curl -SsL --cacert "$cacert" https://registry.npmjs.org/npm/$t; echo "") \
ret=$?
if [ "x$url" = "x" ]; then
ret=125
+ # try without the -e arg to sed.
+ url=`(curl -SsL --cacert "$cacert" https://registry.npmjs.org/npm/$t; echo "") \
+ | sed 's/^.*tarball":"//' \
+ | sed 's/".*$//'`
+ ret=$?
+ if [ "x$url" = "x" ]; then
+ ret=125
+ fi
fi
if [ $ret -ne 0 ]; then
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