1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

dbconsole should not require a username for postgresql. [#207 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
Kyle Hargraves 2008-05-16 06:51:39 -05:00 committed by Pratik Naik
parent 150717344a
commit 77f873acf2

View file

@ -40,10 +40,11 @@ when "mysql"
exec(find_cmd('mysql5', 'mysql'), *args) exec(find_cmd('mysql5', 'mysql'), *args)
when "postgresql" when "postgresql"
ENV['PGUSER'] = config["username"] if config["username"]
ENV['PGHOST'] = config["host"] if config["host"] ENV['PGHOST'] = config["host"] if config["host"]
ENV['PGPORT'] = config["port"].to_s if config["port"] ENV['PGPORT'] = config["port"].to_s if config["port"]
ENV['PGPASSWORD'] = config["password"].to_s if config["password"] ENV['PGPASSWORD'] = config["password"].to_s if config["password"]
exec(find_cmd('psql'), '-U', config["username"], config["database"]) exec(find_cmd('psql'), config["database"])
when "sqlite" when "sqlite"
exec(find_cmd('sqlite'), config["database"]) exec(find_cmd('sqlite'), config["database"])