Skip to content

Commit aada10e

Browse files
PeterDaveHelloarcanis
authored andcommitted
Enable curl --compressed option to speed up request (#5369)
1 parent dcaf03a commit aada10e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

scripts/install-latest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ reset="\e[0m"
55
red="\e[0;31m"
66

77
printf "${red}This script has moved to https://yarnpkg.com/install.sh, please update your URL!$reset\n"
8-
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- "$@"
8+
curl --compressed -o- -L https://yarnpkg.com/install.sh | bash -s -- "$@"

scripts/update-homebrew.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fi;
1212
# number from Yarn site
1313
if [ -z "$YARN_VERSION" ]; then
1414
echo 'Getting Yarn version from https://yarnpkg.com/latest-version'
15-
version=`curl --fail https://yarnpkg.com/latest-version`
15+
version=`curl --compressed --fail https://yarnpkg.com/latest-version`
1616
else
1717
version="$YARN_VERSION"
1818
fi
@@ -38,7 +38,7 @@ popd
3838
# Grab latest Yarn release so we can hash it
3939
url=https://yarnpkg.com/downloads/$version/yarn-v$version.tar.gz
4040
tempfile=`mktemp -t 'yarn-release-XXXXXXXX.tar.gz'`
41-
curl --fail -L -o $tempfile $url
41+
curl --compressed --fail -L -o $tempfile $url
4242
hash=`sha256sum $tempfile | head -c 64`
4343

4444
# Update the formula!

scripts/update-npm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [ "`npm view yarn@$version name`" = 'yarn' ]; then
2121
fi;
2222

2323
# Determine if this is an RC or a stable release
24-
release_type=`curl --fail https://release.yarnpkg.com/release_type/$version`
24+
release_type=`curl --compressed --fail https://release.yarnpkg.com/release_type/$version`
2525
npm_flags=''
2626
if [ "$release_type" = "rc" ]; then
2727
npm_flags='--tag rc'

src/cli/commands/install.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ type Flags = {
8585

8686
function getUpdateCommand(installationMethod: InstallationMethod): ?string {
8787
if (installationMethod === 'tar') {
88-
return `curl -o- -L ${constants.YARN_INSTALLER_SH} | bash`;
88+
return `curl --compressed -o- -L ${constants.YARN_INSTALLER_SH} | bash`;
8989
}
9090

9191
if (installationMethod === 'homebrew') {

0 commit comments

Comments
 (0)