# Repair Docker Desktop engine (500 / pipe / stuck)
# Usage: npm run dev:repair-docker

$ErrorActionPreference = "Stop"
. (Join-Path $PSScriptRoot "lib.ps1")

Write-DevLog "=== docker engine repair ===" "Info"
Repair-DockerEngine -MaxAttempts 1 | Out-Null
if ((Get-DockerEngineStatus) -ne "ok") {
    throw "docker repair failed. Use: npm run dev:infra:setup (WSL mysql/redis, no Docker Desktop)"
}
Write-DevLog "docker engine repair done" "Ok"
