feat: fallback arm64 to x64 architecture for win32 platform

closes https://github.com/oven-sh/setup-bun/issues/130
This commit is contained in:
Jozef Steinhübl 2025-07-10 20:15:27 +02:00
parent 34f777aec1
commit 5b3afef087
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F

View file

@ -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(