[PATCH] box/console: Fix missing variable declaration

Cyrill Gorcunov gorcunov at gmail.com
Mon Oct 7 20:04:43 MSK 2019


During rework of the console lua mode series
the declaration of variable has been lost and
this cause test case for remote unix console
connection to fail.

Fixes issue from c358398c7dc3777712c0dbec2c1b21e69bce2a4a

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 src/box/lua/console.lua | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua
index 3bf6fe9f4..6a0133648 100644
--- a/src/box/lua/console.lua
+++ b/src/box/lua/console.lua
@@ -198,11 +198,10 @@ end
 -- Map output format descriptor into a "\set" command.
 local function output_to_cmd_string(desc)
     if desc["opts"] then
-        string.format("\\set output %s,%s", desc["fmt"], desc["opts"])
+        return string.format("\\set output %s,%s", desc["fmt"], desc["opts"])
     else
-        string.format("\\set output %s", desc["fmt"])
+        return string.format("\\set output %s", desc["fmt"])
     end
-    return cmd
 end
 
 local function format(status, ...)
-- 
2.20.1




More information about the Tarantool-patches mailing list