fix: Fix and rename pg_database_url.sh helper script (#2747)
- Fix and rename pg_database_url helper script - Use single-quote and remove trailing whitespace
This commit is contained in:
@@ -5,6 +5,6 @@ require 'uri'
|
||||
if !ENV['DATABASE_URL'].nil? && ENV['DATABASE_URL'] != ''
|
||||
uri = URI(ENV['DATABASE_URL'])
|
||||
puts "export POSTGRES_HOST=#{uri.host} POSTGRES_PORT=#{uri.port} POSTGRES_USERNAME=#{uri.user}"
|
||||
elif ENV['POSTGRES_PORT'].nil? || ENV['POSTGRES_PORT'] == ''
|
||||
puts "export POSTGRES_PORT=5432"
|
||||
elsif ENV['POSTGRES_PORT'].nil? || ENV['POSTGRES_PORT'] == ''
|
||||
puts 'export POSTGRES_PORT=5432'
|
||||
end
|
||||
Reference in New Issue
Block a user