1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 21:10:05 +08:00

fix(job): return 0 for empty table

This commit is contained in:
Eric Wong 2024-04-16 14:57:06 +08:00
parent 7ff2fec04a
commit 78e32eb47d

View File

@ -92,6 +92,9 @@ function M.start(cmd, opts)
end
table.insert(argv, cmd)
elseif type(cmd) == 'table' then
if #cmd == 0 then
return 0
end
for _, v in ipairs(cmd) do
if type(v) ~= 'string' then
return 0