Skip to content

Commit 77cf908

Browse files
authored
Fixing arch override when windows x64 (#52)
1 parent 604db97 commit 77cf908

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/foojay.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ foojay.fetchtJdkList= function (distribution, version)
2424

2525
local os = RUNTIME.osType
2626
local arch = RUNTIME.archType
27+
-- Convert arm64 to aarch64 for foojay API compatibility
28+
if arch == "arm64" then
29+
arch = "aarch64"
30+
end
31+
2732
if os == "darwin" then
2833
os = "macos"
2934
end
@@ -41,12 +46,6 @@ foojay.fetchtJdkList= function (distribution, version)
4146
lib_c_type = detect_lib_c_type()
4247
end
4348

44-
-- Convert arm64 to aarch64 for foojay API compatibility
45-
local arch = RUNTIME.archType
46-
if arch == "arm64" then
47-
arch = "aarch64"
48-
end
49-
5049
local reqUrl = URL:format(version, distribution, arch, archive_type, os, lib_c_type)
5150

5251
local resp, err = http.get({

0 commit comments

Comments
 (0)