Skip load_server() in inspector when --module is active

This commit is contained in:
dgenio 2026-02-28 11:34:44 +00:00 committed by Jeremiah Lowin
commit f14f7783df

View file

@ -261,7 +261,11 @@ async def inspector(
logger.error("No configuration available")
sys.exit(1)
assert config is not None # For type checker
await config.source.load_server()
# Skip server-object validation in module mode — the module
# manages its own startup and may not expose an importable server.
if not module:
await config.source.load_server()
env_vars = {}
if ui_port: