diff --git a/xmake/modules/detect/tools/find_cosmocc.lua b/xmake/modules/detect/tools/find_cosmocc.lua index be7c873f898..4b0f689e4f1 100644 --- a/xmake/modules/detect/tools/find_cosmocc.lua +++ b/xmake/modules/detect/tools/find_cosmocc.lua @@ -42,5 +42,8 @@ function main(opt) if program and opt and opt.version then version = find_programver(program, opt) end + if program then + program = program:gsub("\\", "/") + end return program, version end