[Release] Follow redirect when downloading tarball (#18845)
Adds -L option to `curl` command. See: https://curl.haxx.se/docs/manpage.html#-L
Andrew Clark committed
May 6, 2020 at 10:28 UTC
a71aa803a127fca462e56dcf0777a27fd8d36c3f
2 files changed
+4
-2
scripts/release/prepare-release-from-npm-commands/check-out-packages.js
+1
-1
@@ -45,7 +45,7 @@ const run = async ({cwd, local, packages, version}) => {
45
const tempPackagePath = join(nodeModulesPath, 'package');
46
47
// 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});
49
await exec(`tar -xvzf ${filePath} -C ${nodeModulesPath}`, {cwd});
50
await exec(`mv ${tempPackagePath} ${packagePath}`, {cwd});
51
await exec(`rm ${filePath}`, {cwd});
scripts/release/shared-commands/download-build-artifacts.js
+3
-1
@@ -30,7 +30,9 @@ const run = async ({build, cwd}) => {
30
31
// Download and extract artifact
32
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
+ });
36
await exec(`mkdir ./build/node_modules`, {cwd});
37
await exec(`tar zxvf ./build/node_modules.tgz -C ./build/node_modules/`, {
38
cwd,