Skip to content

Commit bfc0f75

Browse files
authored
Merge pull request #6479 from xmake-io/msvc
fix #6474
2 parents bcafeff + ef0e784 commit bfc0f75

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xmake/modules/detect/tools/find_cl.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ function main(opt)
6262
return info
6363
end
6464
opt.parse = opt.parse or function (output)
65-
return output:match("(%d+%.%d+%.%d*.-)%s")
65+
-- we only keep the first three digits of the version number, making sure to provide a valid semver string.
66+
-- @see https://github.com/xmake-io/xmake/issues/6474
67+
return output:match("%s(%d+%.%d+%.%d+)")
6668
end
6769
version = find_programver(program, opt)
6870
end

0 commit comments

Comments
 (0)