fix: честная проверка, что Claude реально поднялся
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user