Skip to content
Snippets Groups Projects
Commit 48bf9600 authored by David Douard's avatar David Douard
Browse files

cli: do not add sub sub commands to the main swh cli group

If the loaded command from the entry_point already exists in the
main `swh` command group, do not add is as a command of this later.

The idea is if you have a swh package (say swh.objstorage) that
declares a cli group, then a sub-package of this package (say
swh.objstorage.replayer) also declares a cli group that is a
sub-group of the first package's one (swh.objstorage in the
example above), then we do not want to re-add it again.

Typically, if the entrypoint for swh.objstorage.replayer is:

  [swh.cli.subcommands]
  content-replayer=swh.objstorage.replayer.cli:objstorage_group

with swh.objstorage.replayer.cli:objstorage_group being the cli
group of swh.objstorage, then we do not want to re-add this under
the main swh command group as 'content-replayer'.

Having it loaded is enought to make it registered under its parent
group, here, under `swh objstorage`.
parent 60c535dd
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment