summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/helper/command.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index 8b7be702..e30e2d38 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -445,11 +445,15 @@ int command_run_line_internal_op(command_context_t *context, char *line, int run
if (*line && (line[0] == '#'))
return ERROR_OK;
- LOG_DEBUG("%s", line);
+ if (run)
+ {
+ LOG_DEBUG("%s", line);
+ }
nwords = parse_line(line, words, sizeof(words) / sizeof(words[0]));
if (nwords > 0)
+ {
if (run)
{
retval = find_and_run_command(context, context->commands, words, nwords);
@@ -458,6 +462,7 @@ int command_run_line_internal_op(command_context_t *context, char *line, int run
int t;
return (find_command(context, context->commands, words, nwords, 0, &t)!=NULL)?ERROR_OK:ERROR_FAIL;
}
+ }
else
return ERROR_INVALID_ARGUMENTS;