Skip to content

Commit

Permalink
Try this to properly fail
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus committed Oct 19, 2024
1 parent 3b1b6b3 commit 15cbe1f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions up_integration-test-env.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
$ErrorActionPreference = "Stop"

function Invoke-Call {
param (
[scriptblock]$ScriptBlock,
[string]$ErrorAction = $ErrorActionPreference
)
& @ScriptBlock
if (($lastexitcode -ne 0) -and $ErrorAction -eq "Stop") {
exit $lastexitcode
}
}

# Up containers
docker compose --compatibility -f docker-compose.ci.yml pull
docker compose --compatibility -f docker-compose.ci.yml up -d
Invoke-Call -ScriptBlock { docker compose --compatibility -f docker-compose.ci.yml pull } -ErrorAction Stop
Invoke-Call -ScriptBlock { docker compose --compatibility -f docker-compose.ci.yml up -d } -ErrorAction Stop

# Install curl
# cinst curl -y --no-progress
Expand Down

0 comments on commit 15cbe1f

Please sign in to comment.