diff options
| author | ruki <[email protected]> | 2018-09-21 23:30:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-09-21 15:05:23 +0800 |
| commit | 77f1de5eea59bef799343336c960e9983ffd5cf5 (patch) | |
| tree | c944eeb9be9671a2cc10ec9373bf0943a3a63b6a /xmake/modules/lib/detect/find_tool.lua | |
| parent | e4ce9f64923260de45e83ca735d025e19cce45ad (diff) | |
add find python and python3
Diffstat (limited to 'xmake/modules/lib/detect/find_tool.lua')
| -rw-r--r-- | xmake/modules/lib/detect/find_tool.lua | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/xmake/modules/lib/detect/find_tool.lua b/xmake/modules/lib/detect/find_tool.lua index 0e76cb3a2..e99a9c2d0 100644 --- a/xmake/modules/lib/detect/find_tool.lua +++ b/xmake/modules/lib/detect/find_tool.lua @@ -69,21 +69,20 @@ function main(name, opt) -- find tool name local toolname = find_toolname(name or opt.program) - if not toolname then - return + if toolname then + + -- attempt to find tool from modules first + local tool = _find_from_modules(toolname, opt) + if tool then + return tool + end end -- init program opt.program = opt.program or name - -- attempt to find tool from modules first - local tool = _find_from_modules(toolname, opt) - if tool then - return tool - end - - -- find tool - local program = find_program(opt.program, opt.pathes, opt.check, opt) + -- find program + local program = find_program(opt.program, opt) if not program then return end |
