From 6de2306add95460a488d76e57b5cf2b5db17d5da Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 16 Nov 2015 12:07:08 +0100 Subject: [PATCH] Lua debugger: redis-cli error when --ldb is without --eval. Otherwise the result is a messed CLI without prompt. Thanks to Itamar Haber for reporting this issue. --- src/redis-cli.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/redis-cli.c b/src/redis-cli.c index 09fc28ad..40b74970 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -917,6 +917,13 @@ static int parseOptions(int argc, char **argv) { } } } + + /* --ldb requires --eval. */ + if (config.eval_ldb && config.eval == NULL) { + fprintf(stderr,"Options --ldb and --ldb-sync-mode require --eval.\n"); + fprintf(stderr,"Try %s --help for more information.\n", argv[0]); + exit(1); + } return i; }