diff --git a/newIDE/app/scripts/download-all-build-artifacts.js b/newIDE/app/scripts/download-all-build-artifacts.js index 2293b80899bf..c4cd1f56b018 100644 --- a/newIDE/app/scripts/download-all-build-artifacts.js +++ b/newIDE/app/scripts/download-all-build-artifacts.js @@ -90,17 +90,22 @@ const artifactsToDownload = { (async () => { shell.mkdir('-p', outputPath); - for (const key in artifactsToDownload) { - const { url, outputFilename } = artifactsToDownload[key]; + await Promise.all( + Object.keys(artifactsToDownload).map(async key => { + const { url, outputFilename } = artifactsToDownload[key]; - shell.echo( - `ℹ️ Downloading ${key} artifact (${url}) to ${outputFilename}...` - ); - try { - await downloadLocalFile(url, path.join(outputPath, outputFilename)); - } catch (error) { - shell.echo(`❌ Error while downloading ${key} artifact. Aborting.`); - shell.exit(2); - } - } + shell.echo( + `ℹ️ Downloading ${key} artifact (${url}) to ${outputFilename}...` + ); + try { + await downloadLocalFile(url, path.join(outputPath, outputFilename)); + shell.echo( + `ℹ️ Done downloading ${key} artifact (${url}) to ${outputFilename}...` + ); + } catch (error) { + shell.echo(`❌ Error while downloading ${key} artifact. Aborting.`); + shell.exit(2); + } + }) + ); })();