Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
22959e07
Commit
22959e07
authored
Nov 16, 2015
by
antirez
Browse files
Lua debugger: redis-cli: show compile errors in LDB mode.
parent
70a51694
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
22959e07
...
...
@@ -1209,10 +1209,19 @@ static int evalMode(int argc, char **argv) {
argv2
[
2
]
=
sdscatprintf
(
sdsempty
(),
"%d"
,
keys
);
/* Call it */
int
eval_ldb
=
config
.
eval_ldb
;
/* Save it, may be reverteed. */
int
retval
=
issueCommand
(
argc
+
3
-
got_comma
,
argv2
);
if
(
config
.
eval_ldb
)
{
strncpy
(
config
.
prompt
,
"lua debugger> "
,
sizeof
(
config
.
prompt
));
repl
();
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
));
repl
();
}
}
return
retval
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment