Skip to content

Commit

Permalink
Add trycatch to release asset updater
Browse files Browse the repository at this point in the history
  • Loading branch information
theace0296 committed Sep 21, 2021
1 parent 1c7f1cb commit e1d73c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/update-release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ const run = async () => {
for (const existingAsset of existingAssets) {
if (releaseAssetNames.includes(existingAsset.name)) {
startGroup('Deleting existing asset: ' + existingAsset.name + '...');
await github.repos.deleteReleaseAsset({ ...context.repo, asset_id: existingAsset.id });
try {
await github.repos.deleteReleaseAsset({ ...context.repo, asset_id: existingAsset.id });
} catch (error) {
console.warn(`Unexpected error occured during asset deletion: ${error}`);
}
endGroup();
}
}
Expand Down

0 comments on commit e1d73c8

Please sign in to comment.