diff options
| author | ruki <[email protected]> | 2025-09-19 00:43:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-09-19 00:43:10 +0800 |
| commit | 90e422afa7a4f209ccf8e45e8ec4c54a70456d90 (patch) | |
| tree | 0d7140cc3c44b68c099c7f13970e74b7125fcfab /xmake/modules/lib/detect/find_tool.lua | |
| parent | 47f7c581cc8daacdd109aeed3c007d908bc9ea42 (diff) | |
improve find_tool
Diffstat (limited to 'xmake/modules/lib/detect/find_tool.lua')
| -rw-r--r-- | xmake/modules/lib/detect/find_tool.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/xmake/modules/lib/detect/find_tool.lua b/xmake/modules/lib/detect/find_tool.lua index ddf96753e..dc30b314a 100644 --- a/xmake/modules/lib/detect/find_tool.lua +++ b/xmake/modules/lib/detect/find_tool.lua @@ -33,16 +33,21 @@ function _find_from_modules(name, opt) if program then return {name = toolname or name, program = program, version = version} end + return false end + return nil end -- find tool function _find_tool(name, opt) local toolname = find_toolname(name or opt.program) if toolname then - local tool = _find_from_modules(toolname, opt) - if tool then - return tool + local result = _find_from_modules(toolname, opt) + if result then + return result + elseif result == false then + -- find_xxx.lua exists, but program not found + return end end |
