summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/helper/command.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index ce857dd6..ac7c8d88 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -872,6 +872,9 @@ static void command_help_show_wrap(const char *str, unsigned n, unsigned n2)
static COMMAND_HELPER(command_help_show, struct command *c, unsigned n,
bool show_help)
{
+ if (!command_can_run(CMD_CTX, c))
+ return ERROR_OK;
+
char *cmd_name = command_name(c, ' ');
if (NULL == cmd_name)
return -ENOMEM;