mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-21 13:03:22 +00:00
fix: allow function arg to add runner
This commit is contained in:
parent
dce49574e6
commit
f6c98d5bc0
@ -17,8 +17,12 @@ function runnerHandler.add(name, runner)
|
||||
error 'expected runner name to be a table'
|
||||
end
|
||||
|
||||
if type(runner) == 'function' then
|
||||
runner = {run = runner} -- this probably looks confusing
|
||||
end
|
||||
|
||||
if type(runner) ~= 'table' then
|
||||
error 'expected runner to be a table'
|
||||
error 'expected runner to be a table or function'
|
||||
end
|
||||
|
||||
if runners[name] then
|
||||
|
Loading…
x
Reference in New Issue
Block a user