From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Subject: [Tarantool-patches] [PATCH] box/console: Handle empty output format
Date: Thu, 19 Dec 2019 21:36:04 +0300 [thread overview]
Message-ID: <20191219183604.23113-1-gorcunov@gmail.com> (raw)
In case if output format is not specified
we should exit with more readable error
message.
Fixes #4638
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
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
next reply other threads:[~2019-12-19 18:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 18:36 Cyrill Gorcunov [this message]
2019-12-25 15:06 ` Alexander Turenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191219183604.23113-1-gorcunov@gmail.com \
--to=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] box/console: Handle empty output format' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox