fix: list-strategies shouldn't fail when no strategy is found

closes #12124
This commit is contained in:
Matthias
2025-08-16 19:38:45 +02:00
parent 6dccab9bfe
commit 5d4edb5ec0

View File

@@ -146,6 +146,9 @@ def start_list_strategies(args: dict[str, Any]) -> None:
strategy_objs = StrategyResolver.search_all_objects(
config, not args["print_one_column"], config.get("recursive_strategy_search", False)
)
if not strategy_objs:
logger.warning("No strategies found.")
return
# Sort alphabetically
strategy_objs = sorted(strategy_objs, key=lambda x: x["name"])
for obj in strategy_objs: