diff options
author | Jared Mehle <jrmehle@gmail.com> | 2011-10-03 14:50:40 -0500 |
---|---|---|
committer | Jared Mehle <jrmehle@gmail.com> | 2011-10-03 14:50:40 -0500 |
commit | 80e0cd32905d74b7f0779807d9b2428d5d0ce64b (patch) | |
tree | a52800c19431fcfbda57df1788aa82b73d70d6fa /activerecord/lib | |
parent | 1eac9119620e9b537c1eca9619d4fa3ecb546149 (diff) | |
download | rails-80e0cd32905d74b7f0779807d9b2428d5d0ce64b.tar.gz rails-80e0cd32905d74b7f0779807d9b2428d5d0ce64b.tar.bz2 rails-80e0cd32905d74b7f0779807d9b2428d5d0ce64b.zip |
Quoted path to <Rails.env>_structure.sql file in db:test:clone_structure task.
Leaving the path unquoted causes errors in paths containing spaces or dashes.
Diffstat (limited to 'activerecord/lib')
-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 b3316fd1a2..6145754b45 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -424,10 +424,10 @@ db_namespace = namespace :db do ENV['PGHOST'] = abcs['test']['host'] if abcs['test']['host'] ENV['PGPORT'] = abcs['test']['port'].to_s if abcs['test']['port'] ENV['PGPASSWORD'] = abcs['test']['password'].to_s if abcs['test']['password'] - `psql -U "#{abcs['test']['username']}" -f #{Rails.root}/db/#{Rails.env}_structure.sql #{abcs['test']['database']} #{abcs['test']['template']}` + `psql -U "#{abcs['test']['username']}" -f "#{Rails.root}/db/#{Rails.env}_structure.sql" #{abcs['test']['database']} #{abcs['test']['template']}` when /sqlite/ dbfile = abcs['test']['database'] || abcs['test']['dbfile'] - `sqlite3 #{dbfile} < #{Rails.root}/db/#{Rails.env}_structure.sql` + `sqlite3 #{dbfile} < "#{Rails.root}/db/#{Rails.env}_structure.sql"` when 'sqlserver' `sqlcmd -S #{abcs['test']['host']} -d #{abcs['test']['database']} -U #{abcs['test']['username']} -P #{abcs['test']['password']} -i db\\#{Rails.env}_structure.sql` when 'oci', 'oracle' |