first promise rejection propagates to outer catch

This commit is contained in:
Oli Dacombe authored and softprops committed 2021-07-25 19:54:22 -04:00
1 parent 2e6aa9a7f0
commit 51ef4d3b15
2 files changed
+7 -3

No files matched your search

+6 -2
View File
@@ -53,8 +53,12 @@ async function run() {
if (files.length == 0) {
console.warn(`🤔 ${config.input_files} not include valid file.`);
}
files.forEach(async path => {
await upload(gh, rel.upload_url, path);
await Promise.all(
files.map(async path => {
await upload(gh, rel.upload_url, path);
})
).catch(error => {
throw error;
});
}
console.log(`🎉 Release ready at ${rel.html_url}`);