lualoader: Return meaningful value in cli_execute
loader.command(...) will return whatever the executed function returns, so follow suit and return whatever loader.command() returned or whatever the Lua function returns.
This commit is contained in:
parent
982a973ebe
commit
c6d9f133b3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330369
@ -77,8 +77,7 @@ function cli_execute(...)
|
|||||||
local argv = {...}
|
local argv = {...}
|
||||||
-- Just in case...
|
-- Just in case...
|
||||||
if #argv == 0 then
|
if #argv == 0 then
|
||||||
loader.command(...)
|
return loader.command(...)
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local cmd_name = argv[1]
|
local cmd_name = argv[1]
|
||||||
@ -88,9 +87,9 @@ function cli_execute(...)
|
|||||||
-- traditional reasons for including it don't necessarily apply,
|
-- traditional reasons for including it don't necessarily apply,
|
||||||
-- it may not be totally redundant if we want to have one global
|
-- it may not be totally redundant if we want to have one global
|
||||||
-- handling multiple commands
|
-- handling multiple commands
|
||||||
cmd(...)
|
return cmd(...)
|
||||||
else
|
else
|
||||||
loader.command(...)
|
return loader.command(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user