Skip to content

Commit 305e872

Browse files
committed
(FM-5324) Emit debug output on failed onlyif TSQL
- Previously, there was no way of getting the log output from SQL Server when executing TSQL during an onlyif. Only the status code was emitted, which is not helpful when trying to debug.
1 parent 9997563 commit 305e872

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/puppet/type/sqlserver_tsql.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def self.checks
4242
def check(value)
4343
output = provider.run(value)
4444
debug("OnlyIf returned exitstatus of #{output.exitstatus}")
45+
debug("OnlyIf error: #{output.error_message}") if output.has_errors
4546
output.exitstatus != 0
4647
end
4748
end

0 commit comments

Comments
 (0)