From dedd5fbe52fd9c0ea9d88eb5e622a8de7d578807 Mon Sep 17 00:00:00 2001 From: elhoim Date: Sun, 30 Aug 2026 23:56:38 +0000 Subject: [PATCH] Validate --module names against expansion modules only The --module argument was validated against every module in /modules (import, export, and expansion alike). This let a valid import/export module name pass validation, then silently match nothing in find_modules_for_type and query nothing, exiting 0 as if it had worked. Validate against get_expansion_modules(modules) instead, and report the mismatch as an unknown expansion module. --- bin/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cli.py b/bin/cli.py index 92267b1..d45e8dd 100644 --- a/bin/cli.py +++ b/bin/cli.py @@ -889,15 +889,15 @@ def main() -> int: if selected_modules: available_modules = { m.get("name") - for m in modules + for m in get_expansion_modules(modules) if isinstance(m.get("name"), str) } missing_modules = [m for m in selected_modules if m not in available_modules] if missing_modules: print( - "[!] Unknown module name(s): " + "[!] Unknown expansion module name(s): " + ", ".join(sorted(missing_modules)) - + ". Use /modules introspection to list available names.", + + ". Use /modules introspection to list available expansion module names.", file=sys.stderr, ) return 1