diff options
| author | ruki <[email protected]> | 2020-06-20 12:38:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-20 12:38:44 +0800 |
| commit | 281e06a020f7704fe998be52a6ecc2711cfd4fb7 (patch) | |
| tree | 7296f3837d062dcdf6031b821dc6ea0ff1c8986d /xmake/modules/detect/tools/find_ml.lua | |
| parent | 01dd21d4f3bccda1ff18ad1213b959feeaae37eb (diff) | |
improve to find cl/link
Diffstat (limited to 'xmake/modules/detect/tools/find_ml.lua')
| -rw-r--r-- | xmake/modules/detect/tools/find_ml.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/detect/tools/find_ml.lua b/xmake/modules/detect/tools/find_ml.lua index dda0da3e1..c5da1eaee 100644 --- a/xmake/modules/detect/tools/find_ml.lua +++ b/xmake/modules/detect/tools/find_ml.lua @@ -38,7 +38,7 @@ function main(opt) -- init options opt = opt or {} - opt.check = opt.check or function (program) os.run(program) end + opt.check = opt.check or function (program) os.runv(program, {}, {envs = opt.envs}) end -- find program local program = find_program(opt.program or "ml.exe", opt) @@ -46,7 +46,7 @@ function main(opt) -- find program version local version = nil if program and opt and opt.version then - opt.command = opt.command or function () local _, info = os.iorun(program); return info end + opt.command = opt.command or function () local _, info = os.iorunv(program, {}, {envs = opt.envs}); return info end opt.parse = opt.parse or function (output) return output:match("Version (%d+%.?%d*%.?%d*.-)%s") end version = find_programver(program, opt) end |
