From 6439e4e152231581cb0125967db96ae749b529a7 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Fri, 6 Feb 2026 04:21:02 +0800 Subject: [PATCH] Update astrbot/cli/commands/cmd_run.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- astrbot/cli/commands/cmd_run.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/astrbot/cli/commands/cmd_run.py b/astrbot/cli/commands/cmd_run.py index 6039d2eff..68b71dca9 100644 --- a/astrbot/cli/commands/cmd_run.py +++ b/astrbot/cli/commands/cmd_run.py @@ -52,8 +52,10 @@ def run(reload: bool, host: str, port: str, backend_only: bool) -> None: os.environ["ASTRBOT_ROOT"] = str(astrbot_root) sys.path.insert(0, str(astrbot_root)) - os.environ["DASHBOARD_PORT"] = port or "6185" - os.environ["DASHBOARD_HOST"] = host or "::" + if port is not None: + os.environ["DASHBOARD_PORT"] = port + if host is not None: + os.environ["DASHBOARD_HOST"] = host os.environ["DASHBOARD_ENABLE"] = str(not backend_only) if reload: