mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
fix(cli): move runtime bootstrap into run command
Previously initialize_runtime_bootstrap() was called at module level, causing it to run for ALL astrbot CLI commands (conf admin, etc). Now it only runs when the 'run' command is executed.
This commit is contained in:
@@ -61,7 +61,6 @@ from astrbot.runtime_bootstrap import initialize_runtime_bootstrap
|
||||
if not (sys.version_info.major == 3 and sys.version_info.minor in (12, 13)):
|
||||
sys.exit(1)
|
||||
|
||||
initialize_runtime_bootstrap()
|
||||
# Regular expression to find bash-like parameter expansions:
|
||||
# ${VAR:-default} or ${VAR}
|
||||
_PARAM_EXPAND_RE = re.compile(r"\$\{([^}:]+?)(:-([^}]*))?\}")
|
||||
@@ -169,6 +168,7 @@ def run(
|
||||
debug: bool,
|
||||
) -> None:
|
||||
"""Run AstrBot"""
|
||||
initialize_runtime_bootstrap()
|
||||
try:
|
||||
if debug:
|
||||
log_level = "DEBUG"
|
||||
|
||||
Reference in New Issue
Block a user