mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
fix: enhance error handling in migrate-database.ps1 by implementing try-finally for Docker info command
This commit is contained in:
parent
8238c56b3f
commit
59d8afca4f
1 changed files with 6 additions and 1 deletions
|
|
@ -129,7 +129,12 @@ if (-not (Get-Command docker -ErrorAction SilentlyContinue)) {
|
|||
Write-Err "Docker is not installed. Install Docker Desktop: https://docs.docker.com/desktop/install/windows-install/"
|
||||
}
|
||||
|
||||
docker info *>$null
|
||||
try {
|
||||
$ErrorActionPreference = 'Continue'
|
||||
docker info *>$null
|
||||
} finally {
|
||||
$ErrorActionPreference = 'Stop'
|
||||
}
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Err "Docker daemon is not running. Please start Docker Desktop and try again."
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue