diff options
| author | ruki <[email protected]> | 2022-01-05 15:29:28 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-05 15:29:28 +0800 |
| commit | 1d3a6b0e2b4f91d376899c11390f90c7f259b0ca (patch) | |
| tree | b41770db1e642cccb367203d8b278d8b636044b0 | |
| parent | c85df33090946d24a5e514778bca7a2cbf2a144a (diff) | |
Update target.lua
| -rw-r--r-- | xmake/core/project/target.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 88c3197eb..8ba375fb3 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1993,9 +1993,11 @@ end -- end function _instance:has_tool(toolkind, ...) local _, toolname = self:tool(toolkind) - for _, v in ipairs(table.join(...)) do - if v and toolname:find("^" .. v:gsub("%-", "%%-") .. "$") then - return true + if toolname then + for _, v in ipairs(table.join(...)) do + if v and toolname:find("^" .. v:gsub("%-", "%%-") .. "$") then + return true + end end end end |
