lib/dblink/pg_bouncer_runner.rb in dblink-0.4.1 vs lib/dblink/pg_bouncer_runner.rb in dblink-0.4.2
- old
+ new
@@ -16,11 +16,12 @@
def run
create_config unless @tmp_folder
verbose_arg = @verbose ? '-v' : ''
- pgb_command = "#{pgbouncer_path} #{verbose_arg} ./config.ini"
+ pgb_user_arg = CLI_OPTS[:pgbouncer_user] ? "-u #{CLI_OPTS[:pgbouncer_user]}" : ""
+ pgb_command = "#{pgbouncer_path} #{verbose_arg} #{pgb_user_arg} ./config.ini"
if @verbose
puts "Running pgbouncer with config at: #{@tmp_folder}"
puts "EXEC #{pgb_command}"
end
@@ -64,10 +65,10 @@
if path == ''
puts "Can not find pgbouncer in your system"
puts "Please install it"
exit(1)
else
- return path
+ return path.strip
end
end
end
\ No newline at end of file