first promise rejection propagates to outer catch

This commit is contained in:
Oli Dacombe 2021-04-22 13:59:14 +01:00 committed by softprops
parent 2e6aa9a7f0
commit 51ef4d3b15
2 changed files with 7 additions and 3 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

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