Skip to content

Commit

Permalink
subsys: shell: Print help message only if command doesn't available
Browse files Browse the repository at this point in the history
Fixes: zephyrproject-rtos#11250

Signed-off-by: qianfan Zhao <[email protected]>
  • Loading branch information
qianfan-Zhao authored and nashif committed Nov 11, 2018
1 parent 42a7c43 commit e350683
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions subsys/shell/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,10 @@ static int exec_cmd(const struct shell *shell, size_t argc, char **argv)
} else {
shell_fprintf(shell, SHELL_ERROR,
SHELL_MSG_SPECIFY_SUBCOMMAND);
ret_val = -ENOEXEC;
goto clear;
}

ret_val = -ENOEXEC;
goto clear;
}

if (shell->ctx->active_cmd.args) {
Expand Down

0 comments on commit e350683

Please sign in to comment.