From 0d021b0c4f076cbdf583f54fc79b65d8252aed70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Mon, 29 Jul 2024 21:00:54 +0200 Subject: [PATCH] fix: duplicate v --- src/action.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/action.ts b/src/action.ts index 5b3fc3b..1f678f0 100644 --- a/src/action.ts +++ b/src/action.ts @@ -171,7 +171,7 @@ async function getDownloadUrl(options: Input): Promise { (tag) => tag.ref.startsWith("refs/tags/bun-v") || tag.ref === "refs/tags/canary" ) - .map((item) => item.ref.replace(/refs\/tags\/(bun-)?/g, "")); + .map((item) => item.ref.replace(/refs\/tags\/(bun-v)?/g, "")); const { version, os, arch, avx2, profile } = options; @@ -180,7 +180,7 @@ async function getDownloadUrl(options: Input): Promise { tags = tags.filter((t) => validate(t)).sort(compareVersions); if (version === "latest") tag = `bun-v${tags.at(-1)}`; - else tag = `bun-${tags.filter((t) => satisfies(t, version)).at(-1)}`; + else tag = `bun-v${tags.filter((t) => satisfies(t, version)).at(-1)}`; } const eversion = encodeURIComponent(tag ?? version);