From a5936cb941c1c1b4c5ee189781bfd00fe3acf0b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Godoi?= Date: Sun, 18 Jan 2026 12:22:29 -0300 Subject: [PATCH] Fix architecture type usage in URL formatting The Foojay API now lists Windows amd64 as x64 --- lib/foojay.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/foojay.lua b/lib/foojay.lua index da24f6a..1f02d12 100644 --- a/lib/foojay.lua +++ b/lib/foojay.lua @@ -9,6 +9,7 @@ local URL = foojay.fetchtJdkList= function (distribution, version) local os = RUNTIME.osType + local arch = RUNTIME.archType if os == "darwin" then os = "macos" end @@ -16,6 +17,9 @@ foojay.fetchtJdkList= function (distribution, version) local archive_type = "tar.gz" if os == "windows" then archive_type = "zip" + if (arch == "amd64") then + arch = "x64" + end end local lib_c_type = "" @@ -23,7 +27,7 @@ foojay.fetchtJdkList= function (distribution, version) lib_c_type = "glibc" end - local reqUrl = URL:format(version, distribution, RUNTIME.archType, archive_type, os, lib_c_type) + local reqUrl = URL:format(version, distribution, arch, archive_type, os, lib_c_type) local resp, err = http.get({ url = reqUrl