[Release] Follow redirect when downloading tarball (#18845)

Adds -L option to `curl` command.

See: https://curl.haxx.se/docs/manpage.html#-L
This commit is contained in:
Andrew Clark
2020-05-06 10:28:49 -07:00
committed by GitHub
parent 96f3b7d1c3
commit a71aa803a1
2 changed files with 4 additions and 2 deletions

View File

@@ -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});

View File

@@ -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,