summaryrefslogtreecommitdiff
path: root/xmake/plugins/lua/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-21 23:22:23 +0800
committerruki <[email protected]>2020-02-21 14:14:23 +0800
commit32d7cc5b710f11905d953151e11bb498d9008fb4 (patch)
tree38c2d9024bb5068ec5d84b1bfcc48c2847bdc97f /xmake/plugins/lua/main.lua
parent93d3ae87fb02c5ba13049c67c80fe3713e0026bb (diff)
fix xmake lua
Diffstat (limited to 'xmake/plugins/lua/main.lua')
-rw-r--r--xmake/plugins/lua/main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/plugins/lua/main.lua b/xmake/plugins/lua/main.lua
index 87c14d0b5..f7cdb1db7 100644
--- a/xmake/plugins/lua/main.lua
+++ b/xmake/plugins/lua/main.lua
@@ -107,8 +107,8 @@ function _run_script(script, args)
-- print verbose log
_print_vlog(script_type or "script", script_name or "", args)
- -- dump result
- if type(func) == "function" then
+ -- dump func() result
+ if type(func) == "function" or (type(func) == "table" and func.main and type(func.main) == "function") then
local result = table.pack(func(table.unpack(args, 1, args.n)))
if printresult and result and result.n ~= 0 then
utils.dump(unpack(result, 1, result.n))