Skip to content

Commit

Permalink
fix: simply aliases
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming committed Feb 5, 2024
1 parent 6bae306 commit ff456b6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/bentoml_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,8 @@ def add_subcommands(self, group: click.Group) -> None:
# Common wrappers are already applied, call the super() method
for name, cmd in group.commands.items():
super().add_command(cmd, name)
aliases = getattr(cmd, "aliases", None)
if aliases:
self._commands[name] = aliases
self._aliases.update({alias: name for alias in aliases})
self._commands.update(group._commands)
self._aliases.update(group._aliases)
else:
for name, cmd in group.commands.items():
self.add_command(cmd, name)
Expand Down

0 comments on commit ff456b6

Please sign in to comment.