diff options
| author | ruki <[email protected]> | 2025-05-21 22:30:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-05-21 22:30:20 +0800 |
| commit | ef0e7845588e1ae87b3126cc0b9ff1a71834d4c3 (patch) | |
| tree | 54f85746a84767d9b0893dd3abef5459c91d22ba | |
| parent | bcafeff3c75b26de9b156ed7e7b405e385491084 (diff) | |
fix #6474
| -rw-r--r-- | xmake/modules/detect/tools/find_cl.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/find_cl.lua b/xmake/modules/detect/tools/find_cl.lua index 4f0fb8f77..773ec57e7 100644 --- a/xmake/modules/detect/tools/find_cl.lua +++ b/xmake/modules/detect/tools/find_cl.lua @@ -62,7 +62,9 @@ function main(opt) return info end opt.parse = opt.parse or function (output) - return output:match("(%d+%.%d+%.%d*.-)%s") + -- we only keep the first three digits of the version number, making sure to provide a valid semver string. + -- @see https://github.com/xmake-io/xmake/issues/6474 + return output:match("%s(%d+%.%d+%.%d+)") end version = find_programver(program, opt) end |
