summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-05-07 18:21:38 +0800
committerGitHub <[email protected]>2026-05-07 18:21:38 +0800
commitc14b01fd77d4d31376f03263e9833deadb998e4e (patch)
treeb291afc07d714c9b06c303b5a208e1bab2e29c41
parent8e6ff95b036843f957a144526c5f348043b3873c (diff)
parent4e12dee8d48beb0b21ffb4d33278c81049ce6383 (diff)
Merge pull request #7533 from NateVoid/dev
fix(find_mingw): Support paths like 'mingw/current/bin' and 'mingw/ve…
-rw-r--r--xmake/modules/detect/sdks/find_mingw.lua2
1 files changed, 1 insertions, 1 deletions
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