Skip to content

Commit f4453ca

Browse files
committed
(maint) update task
1 parent 7717c46 commit f4453ca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tasks/sql.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ def get(sql, database, user, port, password, host)
99
env_hash = {}
1010
env_hash['PGPASSWORD'] = password unless password.nil?
1111
cmd_string = ['psql', '-c', sql]
12-
cmd_string << "--dbname=#{database}" unless database.nil?
13-
cmd_string << "--username=#{user}" unless user.nil?
14-
cmd_string << "--port=#{port}" unless port.nil?
15-
cmd_string << "--host=#{host}" unless host.nil?
12+
cmd_string += " --dbname=#{database}" unless database.nil?
13+
cmd_string += " --username=#{user}" unless user.nil?
14+
cmd_string += " --port=#{port}" unless port.nil?
15+
cmd_string += " --host=#{host}" unless host.nil?
1616
stdout, stderr, status = Open3.capture3(env_hash, *cmd_string)
1717
raise Puppet::Error, stderr if status != 0
1818
{ status: stdout.strip }

0 commit comments

Comments
 (0)