This commit is contained in:
Jozef Steinhübl 2026-01-05 00:18:41 +01:00
parent 5dd7893032
commit 7421b243c2
No known key found for this signature in database
GPG Key ID: 8D9A5E4549AA84FD
2 changed files with 4 additions and 10 deletions

View File

@ -51,10 +51,10 @@ async function getSemverDownloadUrl(options: Input): Promise<string> {
const eversion = encodeURIComponent(tag ?? version); const eversion = encodeURIComponent(tag ?? version);
const eos = encodeURIComponent(os ?? getPlatform()); const eos = encodeURIComponent(os ?? getPlatform());
const earch = encodeURIComponent( const earch = encodeURIComponent(
arch ?? getArchitecture(os ?? process.platform, arch ?? process.arch), arch ?? getArchitecture(os ?? getPlatform(), arch ?? process.arch),
); );
const eavx2 = encodeURIComponent( const eavx2 = encodeURIComponent(
getAvx2(os ?? process.platform, arch ?? process.arch, avx2) === false getAvx2(os ?? getPlatform(), arch ?? process.arch, avx2) === false
? "-baseline" ? "-baseline"
: "", : "",
); );

View File

@ -43,10 +43,7 @@ export function getPlatform(): string {
} }
export function getArchitecture(os: string, arch: string): string { export function getArchitecture(os: string, arch: string): string {
if ( if (os === "windows" && (arch === "aarch64" || arch === "arm64")) {
(os === "win32" || os === "windows") &&
(arch === "aarch64" || arch === "arm64")
) {
warning( warning(
[ [
"⚠️ Bun does not provide native arm64 builds for Windows.", "⚠️ Bun does not provide native arm64 builds for Windows.",
@ -65,10 +62,7 @@ export function getArchitecture(os: string, arch: string): string {
export function getAvx2(os: string, arch: string, avx2?: boolean): boolean { export function getAvx2(os: string, arch: string, avx2?: boolean): boolean {
// Temporary workaround for absence of arm64 builds on Windows (#130) // Temporary workaround for absence of arm64 builds on Windows (#130)
if ( if (os === "windows" && (arch === "aarch64" || arch === "arm64")) {
(os === "win32" || os === "windows") &&
(arch === "aarch64" || arch === "arm64")
) {
return false; return false;
} }