diff options
| author | ruki <[email protected]> | 2026-07-18 00:34:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-07-18 00:34:25 +0800 |
| commit | 99bcdf969aa6ad79034f4689a5cf715a960658ca (patch) | |
| tree | 434bd270b418bc96223760db0f9a0b42bc6f1ed7 /xmake | |
| parent | 063bae8898d09f1f999a6fb2ad7a139777ebb7d7 (diff) | |
add transform lua file support
Diffstat (limited to 'xmake')
| -rw-r--r-- | xmake/modules/private/utils/batchcmds.lua | 10 |
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 |
