Skip to content

Commit

Permalink
refactor: wrap validation
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Jul 29, 2024
1 parent d9c4697 commit 2cadd94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ async function getDownloadUrl(options: Input): Promise<string> {

if (version === "latest") tag = `bun-v${tags.at(-1)}`;
else tag = `bun-v${tags.filter((t) => satisfies(t, version)).at(-1)}`;
} else if (validate(tag)) {
tag = `bun-v${tag}`;
}

if (validate(tag)) tag = `bun-v${tag}`;

const eversion = encodeURIComponent(tag ?? version);
const eos = encodeURIComponent(os ?? getPlatform());
const earch = encodeURIComponent(arch ?? getArchitecture());
Expand Down

0 comments on commit 2cadd94

Please sign in to comment.