summaryrefslogtreecommitdiff
path: root/xmake/modules/lib/detect/find_tool.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-09-21 00:25:01 +0800
committerruki <[email protected]>2017-09-20 20:30:08 +0800
commit5fc937a0504b82d0781a60614a51d2a9315f4d27 (patch)
treee1ebb63e10f333986db5c0cc88b4246fca019574 /xmake/modules/lib/detect/find_tool.lua
parent6bad80c6388d32551163053651cb352bd38de967 (diff)
continue to fix find_tool bug
Diffstat (limited to 'xmake/modules/lib/detect/find_tool.lua')
-rw-r--r--xmake/modules/lib/detect/find_tool.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/lib/detect/find_tool.lua b/xmake/modules/lib/detect/find_tool.lua
index 47ea8d97c..f2d5af68c 100644
--- a/xmake/modules/lib/detect/find_tool.lua
+++ b/xmake/modules/lib/detect/find_tool.lua
@@ -34,7 +34,9 @@ function _find_from_modules(name, opt)
local find_tool = import("detect.tools.find_" .. name, {try = true})
if find_tool then
local program, version, toolname = find_tool(opt)
- return {name = toolname or name, program = program, version = version}
+ if program then
+ return {name = toolname or name, program = program, version = version}
+ end
end
end