From 77f1de5eea59bef799343336c960e9983ffd5cf5 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 21 Sep 2018 23:30:53 +0800 Subject: add find python and python3 --- xmake/modules/lib/detect/find_tool.lua | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'xmake/modules/lib/detect') 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 -- cgit v1.3.1