fix: честная проверка, что Claude реально поднялся

This commit is contained in:
2026-09-01 18:43:24 +00:00
parent e52d0dfe24
commit 8ccd7ba5fe
+6
View File
@@ -203,6 +203,12 @@ restart_claude() {
fi fi
fi fi
open -a "Claude" >/dev/null 2>&1 || { warn "Не смог открыть Claude, открой вручную."; return 0; } open -a "Claude" >/dev/null 2>&1 || { warn "Не смог открыть Claude, открой вручную."; return 0; }
# Проверяем, что процесс реально поднялся: рапортовать успех вслепую нельзя.
j=0; while ! pgrep -x "Claude" >/dev/null 2>&1 && [ "$j" -lt 8 ]; do sleep 1; j=$((j+1)); done
if ! pgrep -x "Claude" >/dev/null 2>&1; then
warn "Claude не поднялся автоматически. Конфиги на месте, открой приложение вручную."
return 0
fi
else else
powershell.exe -NoProfile -Command ' powershell.exe -NoProfile -Command '
Get-Process -Name "Claude*" -ErrorAction SilentlyContinue | Stop-Process -Force Get-Process -Name "Claude*" -ErrorAction SilentlyContinue | Stop-Process -Force