mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Lua debugger: redis-cli: show compile errors in LDB mode.
This commit is contained in:
parent
70a51694de
commit
22959e07dc
@ -1209,11 +1209,20 @@ static int evalMode(int argc, char **argv) {
|
|||||||
argv2[2] = sdscatprintf(sdsempty(),"%d",keys);
|
argv2[2] = sdscatprintf(sdsempty(),"%d",keys);
|
||||||
|
|
||||||
/* Call it */
|
/* Call it */
|
||||||
|
int eval_ldb = config.eval_ldb; /* Save it, may be reverteed. */
|
||||||
int retval = issueCommand(argc+3-got_comma, argv2);
|
int retval = issueCommand(argc+3-got_comma, argv2);
|
||||||
if (config.eval_ldb) {
|
if (eval_ldb) {
|
||||||
|
if (!config.eval_ldb) {
|
||||||
|
/* If the debugging session ended immediately, there was an
|
||||||
|
* error compiling the script. Show it and don't enter
|
||||||
|
* the REPL at all. */
|
||||||
|
printf("Eval debugging session can't start:\n");
|
||||||
|
cliReadReply(0);
|
||||||
|
} else {
|
||||||
strncpy(config.prompt,"lua debugger> ",sizeof(config.prompt));
|
strncpy(config.prompt,"lua debugger> ",sizeof(config.prompt));
|
||||||
repl();
|
repl();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user