aboutsummaryrefslogtreecommitdiff
path: root/scripts/bundle.lua
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2022-03-03 13:23:42 +0100
committerMartin Ridgers <[email protected]>2022-03-15 13:45:20 +0100
commitf8170856b601089ba89a69047ccbcd57f16b872b (patch)
tree69badcdb13edeb37441a1be4f10691b65cfb68d8 /scripts/bundle.lua
parentServe the /dashboard endpoint from an embedded .zip file (diff)
downloadzen-f8170856b601089ba89a69047ccbcd57f16b872b.tar.xz
zen-f8170856b601089ba89a69047ccbcd57f16b872b.zip
Allow nil arguments when bundle.lua launches processes
Diffstat (limited to 'scripts/bundle.lua')
-rw-r--r--scripts/bundle.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/bundle.lua b/scripts/bundle.lua
index 90fb13657..e2e43cd87 100644
--- a/scripts/bundle.lua
+++ b/scripts/bundle.lua
@@ -2,8 +2,15 @@
--------------------------------------------------------------------------------
local function _exec(cmd, ...)
- print("--", cmd, ...)
- local ret = os.execv(cmd, {...})
+ local args = {}
+ for _, arg in pairs({...}) do
+ if arg then
+ table.insert(args, arg)
+ end
+ end
+
+ print("--", cmd, table.unpack(args))
+ local ret = os.execv(cmd, args)
print()
return ret
end