From 4138645e0fa485a28f2c630bdcbe734490515231 Mon Sep 17 00:00:00 2001
From: Cyrill Gorcunov <gorcunov@gmail.com>
Date: Sat, 27 Jul 2019 01:17:10 +0300
Subject: [PATCH] box/console: Don't allow arguments in get_default_output

The function

 | require('console').get_default_output()

requires no arguments. Make it explcicit and print
an error otherwise.

Part-of #3834
---
 src/box/lua/console.lua | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua
index 403e7ae7aa..64086cf5bf 100644
--- a/src/box/lua/console.lua
+++ b/src/box/lua/console.lua
@@ -114,7 +114,11 @@ local function set_default_output(value)
     default_output_format["opts"] = opts
 end
 
-local function get_default_output()
+local function get_default_output(...)
+    local args = ...
+    if args ~= nil then
+        error("Arguments provided while prohibited")
+    end
     return default_output_format
 end
 
-- 
GitLab