rjocoleman/capistrano-touch-linked-files — pull request #1 by ojab (2014-05-01 05:10:52+00:00)
Title: Linked files shouldn't be touched before linked dirs creation

If file isn't placed in the top level directory, it's parent dir will not be created and `touch` will fail.

For example, basic rails project layout:
>** Invoke deploy:check:make_linked_dirs (first_time)
>** Invoke linked_files:touch (first_time)
>** Execute linked_files:touch
>DEBUG [34b2aa19] Running /usr/bin/env if test ! -d /opt/prj/shared; then echo "Directory does not exist '/opt/prj/shared'" 1>&2; false; fi on x.amazonaws.com
>DEBUG [34b2aa19] Command: if test ! -d /opt/prj/shared; then echo "Directory does not exist '/opt/prj/shared'" 1>&2; false; fi
>DEBUG [34b2aa19] Finished in 1.586 seconds with exit status 0 (successful).
>INFO [9dc9bb3e] Running /usr/bin/env touch config/database.yml on x.amazonaws.com
>DEBUG [9dc9bb3e] Command: cd /opt/prj/shared && /usr/bin/env touch config/database.yml
>DEBUG [9dc9bb3e] touch:
>DEBUG [9dc9bb3e] cannot touch `config/database.yml'
>DEBUG [9dc9bb3e] : No such file or directory
>DEBUG [9dc9bb3e]
>cap aborted!