Skip to content

Commit 57448a9

Browse files
author
Morgan Haskel
committed
Merge pull request puppetlabs#583 from hunner/fix_4
Fix the handling of run_unless_sql_command in puppet 4
2 parents 0db1be0 + 8204bcd commit 57448a9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/puppet/type/postgresql_psql.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ def sync
3434

3535
# Return true if a matching row is found
3636
def matches(value)
37-
if Puppet::PUPPETVERSION.to_f < 4
38-
output, status = provider.run_unless_sql_command(value)
39-
else
40-
output = provider.run_unless_sql_command(value)
41-
status = output.exitcode
42-
end
37+
output, status = provider.run_unless_sql_command(value)
4338
self.fail("Error evaluating 'unless' clause, returned #{status}: '#{output}'") unless status == 0
4439

4540
result_count = output.strip.to_i

0 commit comments

Comments
 (0)