mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 04:28:28 +02:00
feat: fallback arm64 to x64 architecture for win32 platform
closes https://github.com/oven-sh/setup-bun/issues/130
This commit is contained in:
parent
34f777aec1
commit
5b3afef087
1 changed files with 5 additions and 1 deletions
|
@ -163,7 +163,11 @@ function getDownloadUrl(options: Input): string {
|
||||||
const { version, os, arch, avx2, profile } = options;
|
const { version, os, arch, avx2, profile } = options;
|
||||||
const eversion = encodeURIComponent(version ?? "latest");
|
const eversion = encodeURIComponent(version ?? "latest");
|
||||||
const eos = encodeURIComponent(os ?? process.platform);
|
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 eavx2 = encodeURIComponent(avx2 ?? true);
|
||||||
const eprofile = encodeURIComponent(profile ?? false);
|
const eprofile = encodeURIComponent(profile ?? false);
|
||||||
const { href } = new URL(
|
const { href } = new URL(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue