[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:
parent
96f3b7d1c3
commit
a71aa803a1
|
@ -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});
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue