From afd19e25b5a6b0d8a5cc0b23c5b939088be35a21 Mon Sep 17 00:00:00 2001 From: Charlie Doern Date: Wed, 5 Nov 2025 11:28:43 -0500 Subject: [PATCH] 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 --- src/llama_stack/cli/stack/list_deps.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/llama_stack/cli/stack/list_deps.py b/src/llama_stack/cli/stack/list_deps.py index b6eee1f3b..d6c52c8ef 100644 --- a/src/llama_stack/cli/stack/list_deps.py +++ b/src/llama_stack/cli/stack/list_deps.py @@ -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)