From 4599c4d34c332c2946d12a47cff0e8a1218784e7 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 10 Aug 2026 05:31:55 +0000 Subject: [PATCH] =?UTF-8?q?v3.2:=20=E9=9D=9E=E4=BA=A4=E4=BA=92=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E8=B7=B3=E8=BF=87=20onboard=20=E5=B9=B6=E4=BB=A5=200?= =?UTF-8?q?=20=E9=80=80=E5=87=BA(=E9=A2=84=E6=9C=9F=E8=A1=8C=E4=B8=BA?= =?UTF-8?q?=E9=9D=9E=E5=A4=B1=E8=B4=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 056a1c0..afcee27 100755 --- a/install.sh +++ b/install.sh @@ -863,9 +863,13 @@ onboard_and_start() { ok "检测到 OpenClaw gateway 已在运行,跳过初始化。" else if [ "$NONINTERACTIVE" = "1" ] || [ ! -t 0 ]; then - info "非交互模式:执行 openclaw onboard --install-daemon(自动模式)…" - run_quiet openclaw onboard --install-daemon || \ - warn "onboard 未成功完成,稍后可手动运行:openclaw onboard --install-daemon" + # 非交互模式:onboard 需要 TTY 交互(选模型/配渠道),无法自动完成。 + # 此时未配置任何 provider/渠道,即使强行启动 gateway 也不可用, + # 因此直接跳过并给出明确后续指引,这是预期行为而非失败。 + NONINTERACTIVE_SKIPPED=1 + warn "非交互模式:已跳过初始化与启动。" + hint "OpenClaw 已安装完成,但尚未配置。请在交互终端中执行 ${C_BOLD}claw${C_RESET} 完成配置后再启动。" + return 0 else plain "接下来运行 ${C_BOLD}openclaw onboard --install-daemon${C_RESET} 完成初始化并安装 systemd 服务。" plain "该命令可能会有自己的交互提问,按屏幕提示回答即可。" @@ -1181,6 +1185,10 @@ main() { summary + if [ "${NONINTERACTIVE_SKIPPED:-0}" = "1" ]; then + ok "安装完成。请在交互终端执行 claw 完成配置并启动。" + exit 0 + fi if [ "$start_rc" -eq 0 ]; then ok "全部完成,祝使用愉快。" exit 0