summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2026-07-18 00:34:25 +0800
committerruki <[email protected]>2026-07-18 00:34:25 +0800
commit99bcdf969aa6ad79034f4689a5cf715a960658ca (patch)
tree434bd270b418bc96223760db0f9a0b42bc6f1ed7 /xmake
parent063bae8898d09f1f999a6fb2ad7a139777ebb7d7 (diff)
add transform lua file support
Diffstat (limited to 'xmake')
-rw-r--r--xmake/modules/private/utils/batchcmds.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/xmake/modules/private/utils/batchcmds.lua b/xmake/modules/private/utils/batchcmds.lua
index 2c80574a5..349e31efe 100644
--- a/xmake/modules/private/utils/batchcmds.lua
+++ b/xmake/modules/private/utils/batchcmds.lua
@@ -328,8 +328,14 @@ end
-- add command: call lua function
function batchcmds:call(func, argv, opt)
- sandbox.fork(func)
- table.insert(self:cmds(), {kind = "call", func = func, argv = argv, opt = opt})
+ local functype = type(func)
+ if functype == "string" then
+ self:lua(func, argv, opt)
+ else
+ assert(functype == "function")
+ sandbox.fork(func)
+ table.insert(self:cmds(), {kind = "call", func = func, argv = argv, opt = opt})
+ end
end
-- add command: compile source files