Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added an idiot check so that if airports don't exist the restore task…

… won't choke...
  • Loading branch information...
commit 6bffb28ccf29e33c648b9aaa7d4927b3d8c216dd 1 parent 568861f
hunkybill authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tasks/geonames_tasks.rake
View
4 tasks/geonames_tasks.rake
@@ -32,8 +32,8 @@ namespace :geonames do
["country", "country_region", "country_region_city", "country_region_city_airport"].each do |name|
cmd = "/usr/bin/pg_restore -U postgres -t #{name} -a -d #{config['database']} --format=c < db/#{name}.sql"
# show cmd user before execing
- puts ">#{cmd}"
- puts `#{cmd}`
+ puts "Attempting to restore #{name}"
+ puts `#{cmd}` if File.exists?(name)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.