Skip to content

Commit 0f012e1

Browse files
Eric Promislowselzoc
Eric Promislow
authored andcommitted
Support running bin/console on workstations
* allow non-standard database passwords * this used to work with a fixed DB_CONNECTION_STRING, broken in ccbf6c3 [Finishes #161792902] Signed-off-by: Chris Selzo <[email protected]>
1 parent 27c111e commit 0f012e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bin/console

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ require File.expand_path('../config/boot', __dir__)
44
ENV['RAILS_ENV'] ||= 'production'
55
ENV['SINATRA_ACTIVESUPPORT_WARNING'] ||= 'false'
66

7+
ENV['DB_CONNECTION_STRING'] ||= if ENV['POSTGRES_CONNECTION_PREFIX']
8+
ENV['POSTGRES_CONNECTION_PREFIX'] + '/cc_test'
9+
elsif ENV['MYSQL_CONNECTION_PREFIX']
10+
ENV['MYSQL_CONNECTION_PREFIX'] + '/cc_test'
11+
else
12+
'mysql2://root:password@localhost:3306/cc_test'
13+
end
14+
715
require 'cloud_controller/console'

0 commit comments

Comments
 (0)