Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add default host to dump

  • Loading branch information...
commit 83e52363df76c667bee270fa1f8a7a13a353d201 1 parent 33c99fe
@ddollar authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  init.rb
View
3  init.rb
@@ -56,9 +56,10 @@ def env
def pg_dump_command(url)
uri = URI.parse(url)
database = uri.path[1..-1]
+ host = uri.host || "localhost"
port = uri.port || "5432"
user = uri.user ? "-U #{uri.user}" : ""
- %{ env PGPASSWORD=#{uri.password} pg_dump --verbose -F c -h #{uri.host} #{user} -p #{port} #{database} }
+ %{ env PGPASSWORD=#{uri.password} pg_dump --verbose -F c -h #{host} #{user} -p #{port} #{database} }
end
def pg_restore_command(url)
Please sign in to comment.
Something went wrong with that request. Please try again.