From 9b582626c62639946034e19eb8d2850706f71674 Mon Sep 17 00:00:00 2001 From: nate Date: Thu, 7 May 2026 14:24:19 +0800 Subject: fix(find_mingw): Support paths like 'mingw/current/bin' and 'mingw/version/bin' --- xmake/modules/detect/sdks/find_mingw.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua index 69084f5e4..c70bebb11 100644 --- a/xmake/modules/detect/sdks/find_mingw.lua +++ b/xmake/modules/detect/sdks/find_mingw.lua @@ -53,7 +53,7 @@ function _find_mingwdir(sdkdir, msystem) local buildhash_pattern = string.rep('%x', 32) local match_pattern = "[\\/]packages[\\/]%w[\\/].*mingw.*[\\/][^\\/]+[\\/]" .. buildhash_pattern .. "[\\/]bin" for _, p in ipairs(path.splitenv(pathenv)) do - if (p:find(match_pattern) or p:find(string.ipattern("mingw[%w%-%_%+]*[\\/]bin"))) and + if (p:find(match_pattern) or p:find(string.ipattern("mingw[\\/]?[%w%-%_%+]*[\\/]bin"))) and path.filename(p) == "bin" and os.isdir(p) then sdkdir = path.directory(p) break -- cgit v1.3.1