We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ffadfd2 + ec001fd commit 4684578Copy full SHA for 4684578
lib/puppet/templates/authenticated_query.ps1.erb
@@ -24,7 +24,7 @@ if (!(Get-Command 'sqlcmd.exe' -ErrorAction SilentlyContinue)){
24
}
25
26
$result = sqlcmd.exe -i '<%= input_file %>' -h-1 -W -s ',' <% if @instance != 'MSSQLSERVER' %>-S localhost\<%= @instance %><%end%>
27
- if($result -match "ERROR"){
+ if($result -match "THROW CAUGHT"){
28
Write-Host ($result | where {$_ -match "THROW CAUGHT"} | select -First 1)
29
Write-Error -Message ($result | where {$_ -match "THROW CAUGHT"} | select -First 1)
30
exit(10)
0 commit comments