Skip to content

Commit

Permalink
pass -q to curl calls to disable user .curlrc files
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Feb 3, 2021
1 parent c1589c1 commit 62585cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/install.sh
Expand Up @@ -18,7 +18,7 @@ if [ "x$0" = "xsh" ]; then
# which is a bit cuter. But on others, &1 is already closed,
# so catting to another script file won't do anything.
# Follow Location: headers, and fail on errors
curl -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh
curl -q -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh
ret=$?
if [ $ret -eq 0 ]; then
(exit 0)
Expand Down Expand Up @@ -134,15 +134,15 @@ fi

# need to echo "" after, because Posix sed doesn't treat EOF
# as an implied end of line.
url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \
url=`(curl -qSsL https://registry.npmjs.org/npm/$t; echo "") \
| sed -e 's/^.*tarball":"//' \
| sed -e 's/".*$//'`

ret=$?
if [ "x$url" = "x" ]; then
ret=125
# try without the -e arg to sed.
url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \
url=`(curl -qSsL https://registry.npmjs.org/npm/$t; echo "") \
| sed 's/^.*tarball":"//' \
| sed 's/".*$//'`
ret=$?
Expand All @@ -159,7 +159,7 @@ fi
echo "fetching: $url" >&2

cd "$TMP" \
&& curl -SsL -o npm.tgz "$url" \
&& curl -qSsL -o npm.tgz "$url" \
&& $tar -xzf npm.tgz \
&& cd "$TMP"/package \
&& echo "removing existing npm" \
Expand Down

0 comments on commit 62585cd

Please sign in to comment.