diff options
| author | ruki <[email protected]> | 2017-09-21 00:24:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-09-20 20:27:11 +0800 |
| commit | 6bad80c6388d32551163053651cb352bd38de967 (patch) | |
| tree | 811e21eceb30a78d0370f20afc5b40948ab6eb6a | |
| parent | 79b9be402d6b8676714fad3f979371289fea4128 (diff) | |
fix find_tool bug
| -rw-r--r-- | xmake/modules/lib/detect/find_tool.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/lib/detect/find_tool.lua b/xmake/modules/lib/detect/find_tool.lua index 787e9804f..47ea8d97c 100644 --- a/xmake/modules/lib/detect/find_tool.lua +++ b/xmake/modules/lib/detect/find_tool.lua @@ -43,7 +43,7 @@ end -- @param name the tool name -- @param opt the options, .e.g {program = "xcrun -sdk macosx clang", pathes = {"/usr/bin"}, check = function (tool) os.run("%s -h", tool) end, version = true} -- --- @return {name = "", program = "", version = ""} +-- @return {name = "", program = "", version = ""} or nil -- -- @code -- @@ -80,6 +80,9 @@ function main(name, opt) -- find tool local program = find_program(opt.program, opt.pathes, opt.check) + if not program then + return + end -- find tool version local version = nil |
