Skip to content

Commit

Permalink
Fix unknown command error message in 'help' command
Browse files Browse the repository at this point in the history
  • Loading branch information
aobolensk committed Mar 17, 2024
1 parent 11a96e8 commit ac49a34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cmd/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ async def _help(self, cmd_line: List[str], execution_ctx: ExecutionContext) -> N

def get_help_for_command(cmd_name: str) -> str:
if cmd_name not in bc.executor.commands.keys():
result = f"Unknown command '{cmd_name}'"
return
cmd = bc.executor.commands[cmd_name]
result = ""
Expand All @@ -175,6 +174,8 @@ def get_help_for_command(cmd_name: str) -> str:
if args.command_name is not None:
# !help <command_name>
result = get_help_for_command(args.command_name)
if result is None:
result = f"Unknown command '{args.command_name}'"
await Command.send_message(execution_ctx, result)
return
# !help
Expand Down

0 comments on commit ac49a34

Please sign in to comment.