capistrano/capistrano — pull request #395 by dwbutler (2013-02-18 22:20:37+00:00)
Title: Fix for when paths are nil

This pull request fixes my specific problem, but I'm sure this must be a more general issue.

My issue occurred when trying to deploy to an app that does not have app or web roles. In this case, all the asset tasks should be skipped. However, it appears that the code inside of the asset tasks is still evaluated. The problem occurred on this line:

https://github.com/capistrano/capistrano/blob/master/lib/capistrano/recipes/deploy/assets.rb#L49

```current_release``` evaluates to nil, which causes the whole capistrano deploy to fail. It appears this is happening because the precompile task is supposed to be skipped, therefore any tasks running for the first time inside this task are skipped. But I'm not sure. It seems like a bug to me.

Anyway, in general it seems any of these paths could be nil, so I fixed the issue by calling ```to_s.shellescape``` instead of just ```shellescape```.