From 5b3afef0872cf9d16a6e8f690dd3a299b6e3c064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Thu, 10 Jul 2025 20:15:27 +0200 Subject: [PATCH] feat: fallback arm64 to x64 architecture for win32 platform closes https://github.com/oven-sh/setup-bun/issues/130 --- src/action.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/action.ts b/src/action.ts index b3c26bf..2b6d8c1 100644 --- a/src/action.ts +++ b/src/action.ts @@ -163,7 +163,11 @@ function getDownloadUrl(options: Input): string { const { version, os, arch, avx2, profile } = options; const eversion = encodeURIComponent(version ?? "latest"); const eos = encodeURIComponent(os ?? process.platform); - const earch = encodeURIComponent(arch ?? process.arch); + const earch = encodeURIComponent( + (os ?? process.platform) === "win32" && (arch ?? process.arch) === "arm64" + ? "x64" + : (arch ?? process.arch), + ); // Temporary workaround for absence of arm64 builds on Windows (#130) const eavx2 = encodeURIComponent(avx2 ?? true); const eprofile = encodeURIComponent(profile ?? false); const { href } = new URL(