From c6d9f133b34b37813abc902f084d068c81f48544 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sun, 4 Mar 2018 03:21:12 +0000 Subject: [PATCH] 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. --- stand/lua/cli.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stand/lua/cli.lua b/stand/lua/cli.lua index d48606e45cb4..d6c3a54b9bf9 100644 --- a/stand/lua/cli.lua +++ b/stand/lua/cli.lua @@ -77,8 +77,7 @@ function cli_execute(...) local argv = {...} -- Just in case... if #argv == 0 then - loader.command(...) - return + return loader.command(...) end local cmd_name = argv[1] @@ -88,9 +87,9 @@ function cli_execute(...) -- traditional reasons for including it don't necessarily apply, -- it may not be totally redundant if we want to have one global -- handling multiple commands - cmd(...) + return cmd(...) else - loader.command(...) + return loader.command(...) end end