fix: честная проверка, что Claude реально поднялся
This commit is contained in:
@@ -126,8 +126,16 @@ function Restart-Claude {
|
|||||||
$i = 0
|
$i = 0
|
||||||
while ((Get-Process -Name "Claude*" -ErrorAction SilentlyContinue) -and $i -lt 12) { Start-Sleep 1; $i++ }
|
while ((Get-Process -Name "Claude*" -ErrorAction SilentlyContinue) -and $i -lt 12) { Start-Sleep 1; $i++ }
|
||||||
$exe = Find-ClaudeExe
|
$exe = Find-ClaudeExe
|
||||||
if ($exe) { Start-Process $exe.FullName; Ok "Claude перезапущен." }
|
if (-not $exe) { Warn "Не нашёл claude.exe, открой Claude вручную."; return }
|
||||||
else { Warn "Не нашёл claude.exe, открой Claude вручную." }
|
Start-Process $exe.FullName
|
||||||
|
# Проверяем, что процесс реально поднялся: рапортовать успех вслепую нельзя.
|
||||||
|
$j = 0
|
||||||
|
while (-not (Get-Process -Name "Claude*" -ErrorAction SilentlyContinue) -and $j -lt 8) { Start-Sleep 1; $j++ }
|
||||||
|
if (Get-Process -Name "Claude*" -ErrorAction SilentlyContinue) {
|
||||||
|
Ok "Claude перезапущен."
|
||||||
|
} else {
|
||||||
|
Warn "Claude не поднялся автоматически. Конфиги на месте, открой приложение вручную."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---------- ОТКАТ ----------
|
# ---------- ОТКАТ ----------
|
||||||
|
|||||||
Reference in New Issue
Block a user