Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a71aa80

Browse files
authored
[Release] Follow redirect when downloading tarball (facebook#18845)
Adds -L option to `curl` command. See: https://curl.haxx.se/docs/manpage.html#-L
1 parent 96f3b7d commit a71aa80

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

scripts/release/prepare-release-from-npm-commands/check-out-packages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const run = async ({cwd, local, packages, version}) => {
4545
const tempPackagePath = join(nodeModulesPath, 'package');
4646

4747
// Download packages from NPM and extract them to the expected build locations.
48-
await exec(`curl ${url} > ${filePath}`, {cwd});
48+
await exec(`curl -L ${url} > ${filePath}`, {cwd});
4949
await exec(`tar -xvzf ${filePath} -C ${nodeModulesPath}`, {cwd});
5050
await exec(`mv ${tempPackagePath} ${packagePath}`, {cwd});
5151
await exec(`rm ${filePath}`, {cwd});

scripts/release/shared-commands/download-build-artifacts.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ const run = async ({build, cwd}) => {
3030

3131
// Download and extract artifact
3232
await exec(`rm -rf ./build/node_modules*`, {cwd});
33-
await exec(`curl ${nodeModulesURL} --output ./build/node_modules.tgz`, {cwd});
33+
await exec(`curl -L ${nodeModulesURL} --output ./build/node_modules.tgz`, {
34+
cwd,
35+
});
3436
await exec(`mkdir ./build/node_modules`, {cwd});
3537
await exec(`tar zxvf ./build/node_modules.tgz -C ./build/node_modules/`, {
3638
cwd,

0 commit comments

Comments
 (0)