Skip to content

Commit 18b811c

Browse files
committed
Added connection string error out
1 parent 457f68b commit 18b811c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Helpers/projectInitCompareOptions.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ $Schemas = @("") # can be empty for SqlServer
1010

1111

1212
flyway auth -IAgreeToTheEula -startEnterpriseTrial
13-
flyway testConnection "-url=$Url" "-user=$User" "-password=$Password" "-schemas=$Schemas"
13+
$ErrorActionPreference = 'Break'
14+
flyway testConnection "-url=$Url" "-user=$User" "-password=$Password" "-schemas=$Schemas"
15+
if ($LASTEXITCODE -ne 0) {
16+
exit 1
17+
}
1418

1519
if (Test-Path -Path "$projectPath\$projectName") {
1620
Remove-Item -Path $projectName -Recurse -Force

0 commit comments

Comments
 (0)