diff --git a/setup.ps1 b/setup.ps1 index a704ef8..aafa784 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -126,8 +126,16 @@ function Restart-Claude { $i = 0 while ((Get-Process -Name "Claude*" -ErrorAction SilentlyContinue) -and $i -lt 12) { Start-Sleep 1; $i++ } $exe = Find-ClaudeExe - if ($exe) { Start-Process $exe.FullName; Ok "Claude перезапущен." } - else { Warn "Не нашёл claude.exe, открой Claude вручную." } + if (-not $exe) { Warn "Не нашёл claude.exe, открой Claude вручную."; return } + 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 не поднялся автоматически. Конфиги на месте, открой приложение вручную." + } } # ---------- ОТКАТ ----------