From ec001fdc6ab6bd162ceb7ecf9d6e8a553f183c9e Mon Sep 17 00:00:00 2001 From: Travis Fields Date: Wed, 28 Jan 2015 11:13:44 -0800 Subject: [PATCH] Fix bug with TSQL provider rework --- lib/puppet/templates/authenticated_query.ps1.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/templates/authenticated_query.ps1.erb b/lib/puppet/templates/authenticated_query.ps1.erb index d9049b96..5e712d02 100644 --- a/lib/puppet/templates/authenticated_query.ps1.erb +++ b/lib/puppet/templates/authenticated_query.ps1.erb @@ -24,7 +24,7 @@ if (!(Get-Command 'sqlcmd.exe' -ErrorAction SilentlyContinue)){ } $result = sqlcmd.exe -i '<%= input_file %>' -h-1 -W -s ',' <% if @instance != 'MSSQLSERVER' %>-S localhost\<%= @instance %><%end%> - if($result -match "ERROR"){ + if($result -match "THROW CAUGHT"){ Write-Host ($result | where {$_ -match "THROW CAUGHT"} | select -First 1) Write-Error -Message ($result | where {$_ -match "THROW CAUGHT"} | select -First 1) exit(10)