BUGFIX: actually use db_conf everywhere

This commit is contained in:
Régis Hanol 2014-02-19 15:43:59 +01:00
parent 438f97d8b0
commit 27f3aa6bdc
2 changed files with 4 additions and 4 deletions

View File

@ -154,8 +154,8 @@ module Export
def build_pg_dump_command
db_conf = BackupRestore.database_configuration
password_argument = "PGPASSWORD=#{password}" if db_conf.password.present?
host_argument = "--host=#{host}" if db_conf.host.present?
password_argument = "PGPASSWORD=#{db_conf.password}" if db_conf.password.present?
host_argument = "--host=#{db_conf.host}" if db_conf.host.present?
[ password_argument, # pass the password to pg_dump
"pg_dump", # the pg_dump command

View File

@ -202,8 +202,8 @@ module Import
def build_psql_command
db_conf = BackupRestore.database_configuration
password_argument = "PGPASSWORD=#{password}" if db_conf.password.present?
host_argument = "--host=#{host}" if db_conf.host.present?
password_argument = "PGPASSWORD=#{db_conf.password}" if db_conf.password.present?
host_argument = "--host=#{db_conf.host}" if db_conf.host.present?
[ password_argument, # pass the password to psql
"psql", # the psql command