jw-pkg.sh: Print help for missing subcommands

Print a help message if no subcommand is specified for one of the
comamnds "distro" and "projects".

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-23 07:19:45 +01:00
commit c8036ad216
4 changed files with 16 additions and 2 deletions

View file

@ -43,4 +43,6 @@ class CmdDistro(CmdBase): # export
return self.__interactive
async def _run(self, args):
raise Exception("Running with args", args)
# Missing subcommand
self.parser.print_help()
sys.exit(1)

View file

@ -16,4 +16,6 @@ class CmdProjects(CmdBase): # export
super().add_arguments(p)
async def _run(self, args):
raise Exception("Running with args", args)
# Missing subcommand
self.parser.print_help()
sys.exit(1)