mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-02-23 18:50:10 +08:00
refactor: wrap validation
This commit is contained in:
parent
d9c4697ce6
commit
2cadd94599
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user