From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 7326946970E for ; Thu, 19 Dec 2019 21:36:08 +0300 (MSK) Received: by mail-lf1-f54.google.com with SMTP id y19so5043661lfl.9 for ; Thu, 19 Dec 2019 10:36:08 -0800 (PST) From: Cyrill Gorcunov Date: Thu, 19 Dec 2019 21:36:04 +0300 Message-Id: <20191219183604.23113-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH] box/console: Handle empty output format List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml In case if output format is not specified we should exit with more readable error message. Fixes #4638 Signed-off-by: Cyrill Gorcunov --- issue: https://github.com/tarantool/tarantool/issues/4638 branch: gorcunov/gh-4638-set-output-empty src/box/lua/console.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua index d4d8ec984..141da8754 100644 --- a/src/box/lua/console.lua +++ b/src/box/lua/console.lua @@ -114,6 +114,9 @@ end local function parse_output(value) local fmt, opts + if not value then + return 'Specify output format: lua or yaml.' + end if value:match("([^,]+),([^,]+)") ~= nil then fmt, opts = value:match("([^,]+),([^,]+)") else -- 2.20.1