BUGFIX: Use ENV["USER"] before falling back to postgres
This commit is contained in:
parent
73aca9063d
commit
0438abf139
|
@ -155,7 +155,7 @@ module Export
|
|||
db_conf = Rails.configuration.database_configuration[Rails.env]
|
||||
host = db_conf["host"]
|
||||
password = db_conf["password"]
|
||||
username = db_conf["username"] || "postgres"
|
||||
username = db_conf["username"] || ENV["USER"] || "postgres"
|
||||
database = db_conf["database"]
|
||||
|
||||
password_argument = "PGPASSWORD=#{password}" if password.present?
|
||||
|
|
|
@ -203,7 +203,7 @@ module Import
|
|||
db_conf = Rails.configuration.database_configuration[Rails.env]
|
||||
host = db_conf["host"]
|
||||
password = db_conf["password"]
|
||||
username = db_conf["username"] || "postgres"
|
||||
username = db_conf["username"] || ENV["USER"] || "postgres"
|
||||
database = db_conf["database"]
|
||||
|
||||
password_argument = "PGPASSWORD=#{password}" if password.present?
|
||||
|
|
Loading…
Reference in New Issue