fix: keep installer doctor non-interactive

This commit is contained in:
Peter Steinberger
2026-04-08 08:26:58 +01:00
parent b328c66115
commit 928a9e4915
7 changed files with 38 additions and 10 deletions

View File

@@ -2466,15 +2466,13 @@ main() {
return 0
fi
local -a doctor_args=()
if [[ "$NO_ONBOARD" == "1" ]]; then
if "$claw" doctor --help 2>/dev/null | grep -q -- "--non-interactive"; then
doctor_args+=("--non-interactive")
fi
if [[ "$NO_ONBOARD" == "1" || "$NO_PROMPT" == "1" ]]; then
doctor_args+=("--non-interactive")
fi
ui_info "Running openclaw doctor"
local doctor_ok=0
if (( ${#doctor_args[@]} )); then
OPENCLAW_UPDATE_IN_PROGRESS=1 "$claw" doctor "${doctor_args[@]}" </dev/tty && doctor_ok=1
OPENCLAW_UPDATE_IN_PROGRESS=1 "$claw" doctor "${doctor_args[@]}" </dev/null && doctor_ok=1
else
OPENCLAW_UPDATE_IN_PROGRESS=1 "$claw" doctor </dev/tty && doctor_ok=1
fi