Skip to content

Commit

Permalink
Merge pull request everzet#112 from jeremykendall/patch-namespace-dat…
Browse files Browse the repository at this point in the history
…abase-dump-pgsql

Removes --password flag from pg_dump
  • Loading branch information
everzet committed Apr 17, 2012
2 parents 2fb98e7 + 8b867e4 commit 004759c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/symfony1.rb
Expand Up @@ -451,7 +451,7 @@ def load_database_config(data, env)
puts data
end
when 'pgsql'
run "pg_dump -U #{config['user']} --password='#{config['pass']}' #{config['db']} | gzip -c > #{file}" do |ch, stream, data|
run "pg_dump -U #{config['user']} #{config['db']} | gzip -c > #{file}" do |ch, stream, data|
puts data
end
end
Expand Down Expand Up @@ -481,7 +481,7 @@ def load_database_config(data, env)
when 'mysql'
`mysqldump -u#{config['user']} --password=\"#{config['pass']}\" #{config['db']} > #{tmpfile}`
when 'pgsql'
`pg_dump -U #{config['user']} --password=\"#{config['pass']}\" #{config['db']} > #{tmpfile}`
`pg_dump -U #{config['user']} #{config['db']} > #{tmpfile}`
end
File.open(tmpfile, "r+") do |f|
gz = Zlib::GzipWriter.open(file)
Expand Down
4 changes: 2 additions & 2 deletions lib/symfony2.rb
Expand Up @@ -74,7 +74,7 @@ def load_database_config(data, env)
puts data
end
when 'pdo_pgsql'
run "pg_dump -U #{config['database_user']} --password='#{config['database_password']}' #{config['database_name']} | gzip -c > #{file}" do |ch, stream, data|
run "pg_dump -U #{config['database_user']} #{config['database_name']} | gzip -c > #{file}" do |ch, stream, data|
puts data
end
end
Expand Down Expand Up @@ -104,7 +104,7 @@ def load_database_config(data, env)
when 'pdo_mysql'
`mysqldump -u#{config['database_user']} --password=\"#{config['database_password']}\" #{config['database_name']} > #{tmpfile}`
when 'pdo_pgsql'
`pg_dump -U #{config['database_user']} --password=\"#{config['database_password']}\" #{config['database_name']} > #{tmpfile}`
`pg_dump -U #{config['database_user']} #{config['database_name']} > #{tmpfile}`
end
File.open(tmpfile, "r+") do |f|
gz = Zlib::GzipWriter.open(file)
Expand Down

0 comments on commit 004759c

Please sign in to comment.