Skip to content

Commit

Permalink
fix: unrecognized architecture preventing start up (#9)
Browse files Browse the repository at this point in the history
catch errors and filter out undetermined architectures
  • Loading branch information
dopry authored Sep 12, 2023
1 parent 91db60e commit 8f74b5f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/backends/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,15 @@ export class GitHubBackend extends Backend {
const published_at = release.published_at
? new Date(release.published_at)
: new Date(99999, 12, 31);
const valid_assets = release.assets.filter(
(asset) => filenameToPlatform(asset.name) != null
);
const valid_assets = release.assets.filter((asset) => {
try {
return filenameToPlatform(asset.name) != null;
} catch (err) {
console.error(err);
} finally {
return false;
}
});
const assets = valid_assets
.map((asset) => {
try {
Expand Down

0 comments on commit 8f74b5f

Please sign in to comment.