fix
This commit is contained in:
parent
5dd7893032
commit
7421b243c2
@ -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"
|
||||||
: "",
|
: "",
|
||||||
);
|
);
|
||||||
|
|||||||
10
src/utils.ts
10
src/utils.ts
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user