mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 18:00:36 +00:00
fix: print help for list-deps when args not given
list-deps takes positional args OR things like --providers the issue with this, is that these args need to be optional since by nature, one or the other can be specified. add a check to list-deps that checks if not args.providers and not args.config. If this is true, help is printed and we exit. resolves #4075 Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
fd1603beef
commit
afd19e25b5
1 changed files with 4 additions and 0 deletions
|
|
@ -46,6 +46,10 @@ class StackListDeps(Subcommand):
|
|||
def _run_stack_list_deps_command(self, args: argparse.Namespace) -> None:
|
||||
# always keep implementation completely silo-ed away from CLI so CLI
|
||||
# can be fast to load and reduces dependencies
|
||||
if not args.config and not args.providers:
|
||||
self.parser.print_help()
|
||||
self.parser.exit()
|
||||
|
||||
from ._list_deps import run_stack_list_deps_command
|
||||
|
||||
return run_stack_list_deps_command(args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue