From a71aa803a127fca462e56dcf0777a27fd8d36c3f Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Wed, 6 May 2020 10:28:49 -0700 Subject: [PATCH] [Release] Follow redirect when downloading tarball (#18845) Adds -L option to `curl` command. See: https://curl.haxx.se/docs/manpage.html#-L --- .../prepare-release-from-npm-commands/check-out-packages.js | 2 +- scripts/release/shared-commands/download-build-artifacts.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/release/prepare-release-from-npm-commands/check-out-packages.js b/scripts/release/prepare-release-from-npm-commands/check-out-packages.js index 4f4cbb29e3..ea7d1252a0 100644 --- a/scripts/release/prepare-release-from-npm-commands/check-out-packages.js +++ b/scripts/release/prepare-release-from-npm-commands/check-out-packages.js @@ -45,7 +45,7 @@ const run = async ({cwd, local, packages, version}) => { const tempPackagePath = join(nodeModulesPath, 'package'); // Download packages from NPM and extract them to the expected build locations. - await exec(`curl ${url} > ${filePath}`, {cwd}); + await exec(`curl -L ${url} > ${filePath}`, {cwd}); await exec(`tar -xvzf ${filePath} -C ${nodeModulesPath}`, {cwd}); await exec(`mv ${tempPackagePath} ${packagePath}`, {cwd}); await exec(`rm ${filePath}`, {cwd}); diff --git a/scripts/release/shared-commands/download-build-artifacts.js b/scripts/release/shared-commands/download-build-artifacts.js index 943e4106ef..7158341934 100644 --- a/scripts/release/shared-commands/download-build-artifacts.js +++ b/scripts/release/shared-commands/download-build-artifacts.js @@ -30,7 +30,9 @@ const run = async ({build, cwd}) => { // Download and extract artifact await exec(`rm -rf ./build/node_modules*`, {cwd}); - await exec(`curl ${nodeModulesURL} --output ./build/node_modules.tgz`, {cwd}); + await exec(`curl -L ${nodeModulesURL} --output ./build/node_modules.tgz`, { + cwd, + }); await exec(`mkdir ./build/node_modules`, {cwd}); await exec(`tar zxvf ./build/node_modules.tgz -C ./build/node_modules/`, { cwd,