mperham/sidekiq — pull request #1296 by juanibiapina (2013-10-29 17:30:27+00:00)
Title: Only cd into current_path if pid file exists.

When doing a fresh capistrano 3 deploy, the current_path does't exist yet, so the line

within current_path do

will fail, according to this: https://github.com/leehambley/sshkit/blob/master/lib/sshkit/backends/abstract.rb#L73

I have just moved the within call to be done after the check for pid existence.