packages/flavours: rename cmd_flavours_list() to cmd_flavours(), add to main cli directly
This commit is contained in:
parent
6581e34087
commit
0e86de1f44
4 changed files with 4 additions and 9 deletions
2
main.py
2
main.py
|
@ -12,6 +12,7 @@ from config import config, config_option, cmd_config
|
|||
from forwarding import cmd_forwarding
|
||||
from packages.cli import cmd_packages
|
||||
from devices.cli import cmd_devices
|
||||
from packages.flavour import cmd_flavours
|
||||
from telnet import cmd_telnet
|
||||
from chroot import cmd_chroot
|
||||
from cache import cmd_cache
|
||||
|
@ -66,6 +67,7 @@ cli.add_command(cmd_chroot)
|
|||
cli.add_command(cmd_config)
|
||||
cli.add_command(cmd_devices)
|
||||
cli.add_command(cmd_flash)
|
||||
cli.add_command(cmd_flavours)
|
||||
cli.add_command(cmd_forwarding)
|
||||
cli.add_command(cmd_image)
|
||||
cli.add_command(cmd_packages)
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
from packages.cli import cmd_packages
|
||||
|
||||
assert cmd_packages # stop unused warnings; needs to be imported for click docs to be generated
|
|
@ -17,7 +17,6 @@ from wrapper import check_programs_wrap, enforce_wrap
|
|||
|
||||
from .build import build_packages_by_paths
|
||||
from .pkgbuild import discover_pkgbuilds, filter_pkgbuilds, init_pkgbuilds
|
||||
from .flavour import cmd_flavours_list
|
||||
|
||||
|
||||
def build(
|
||||
|
@ -51,9 +50,6 @@ def cmd_packages():
|
|||
"""Build and manage packages and PKGBUILDs"""
|
||||
|
||||
|
||||
cmd_packages.add_command(cmd_flavours_list, 'flavours')
|
||||
|
||||
|
||||
@cmd_packages.command(name='update')
|
||||
@click.option('--non-interactive', is_flag=True)
|
||||
@click.option('--switch-branch', is_flag=True, help="Force the branch to be corrected even in non-interactive mode")
|
||||
|
|
|
@ -114,8 +114,8 @@ def get_profile_flavour(profile_name: Optional[str] = None) -> Flavour:
|
|||
return get_flavour(profile.flavour)
|
||||
|
||||
|
||||
@click.command(name='list')
|
||||
def cmd_flavours_list():
|
||||
@click.command(name='flavours')
|
||||
def cmd_flavours():
|
||||
'list information about available flavours'
|
||||
flavours = get_flavours()
|
||||
if not flavours:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue