fix: docker check usaba -not sobre output vacio en vez de LASTEXITCODE

if (-not (cmd /c ...)) comprueba el OUTPUT (siempre vacio con >NUL),
no el exit code: en Windows el script entraba en la rama de error
aunque Docker estuviera OK. Detectado en smoke test con pwsh 7.4.6.
This commit is contained in:
hermes committed 2026-09-12 19:32:36 +02:00
1 parent 23631884dd
commit c8e0f2e5ed
4 files changed
+8 -4

No files matched your search

+2 -1
View File
@@ -63,7 +63,8 @@ if (-not (Get-Command docker -ErrorAction SilentlyContinue)) {
}
# En PS 5.1, *> $null sobre comandos nativos convierte stderr en errores
# terminantes con EAP=Stop (PS #4002). Se descarta via cmd /c.
if (-not (cmd /c "docker info >NUL 2>&1")) {
$null = cmd /c "docker info >NUL 2>&1"
if ($LASTEXITCODE -ne 0) {
Err 'Docker Desktop no responde. Abre Docker Desktop y espera a que arranque.'
exit 1
}