diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-24 15:12:11 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-24 15:12:11 -0700 |
commit | a9af9f10cb841ed1c2f51c7990cef76297b15e39 (patch) | |
tree | eaceb4b8b93381c29b33c481c1770a1f56f517f3 /activerecord/lib/active_record | |
parent | 356f2a6d8b3bb48b9c7d7508de932121d0e013bb (diff) | |
parent | 587de842581fa604564595c58019161f6acc4b1b (diff) | |
download | rails-a9af9f10cb841ed1c2f51c7990cef76297b15e39.tar.gz rails-a9af9f10cb841ed1c2f51c7990cef76297b15e39.tar.bz2 rails-a9af9f10cb841ed1c2f51c7990cef76297b15e39.zip |
Merge pull request #5925 from Juanmcuello/pg_structure_dump
Quote arguments in db:structure:dump for PostgreSQL.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 4985abc31a..abdd935bdc 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -387,9 +387,9 @@ db_namespace = namespace :db do set_psql_env(abcs[Rails.env]) search_path = abcs[Rails.env]['schema_search_path'] unless search_path.blank? - search_path = search_path.split(",").map{|search_path_part| "--schema=#{search_path_part.strip}" }.join(" ") + search_path = search_path.split(",").map{|search_path_part| "--schema=#{Shellwords.escape(search_path_part.strip)}" }.join(" ") end - `pg_dump -i -s -x -O -f #{filename} #{search_path} #{abcs[Rails.env]['database']}` + `pg_dump -i -s -x -O -f #{Shellwords.escape(filename)} #{search_path} #{Shellwords.escape(abcs[Rails.env]['database'])}` raise 'Error dumping database' if $?.exitstatus == 1 when /sqlite/ dbfile = abcs[Rails.env]['database'] |