lib/thinking_sphinx/deploy/capistrano.rb in thinking-sphinx-1.3.3 vs lib/thinking_sphinx/deploy/capistrano.rb in thinking-sphinx-1.3.4
- old
+ new
@@ -91,10 +91,10 @@
def rake(*tasks)
rails_env = fetch(:rails_env, "production")
rake = fetch(:rake, "rake")
tasks.each do |t|
- run "cd #{current_path}; #{rake} RAILS_ENV=#{rails_env} #{t}"
+ run "if [ -d #{release_path} ]; then cd #{release_path}; else cd #{current_path}; fi; #{rake} RAILS_ENV=#{rails_env} #{t}"
end
end
end
end