From fccdaccb8def5df25b0565c57fe3cf2ba4b956e4 Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 3 Mar 2014 17:03:24 +0100 Subject: [PATCH] fix initial deploy (return value) [ci skip] --- lib/capistrano/tasks/deploy_initial.cap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/capistrano/tasks/deploy_initial.cap b/lib/capistrano/tasks/deploy_initial.cap index b1885b73..b33cac79 100644 --- a/lib/capistrano/tasks/deploy_initial.cap +++ b/lib/capistrano/tasks/deploy_initial.cap @@ -102,7 +102,7 @@ namespace :deploy do path = releases_path.join(capture(:ls, releases_path).split("\n").sort.last) fetch(:linked_files).each do |file| # TODO copy only if existing destination has zero length - execute "[ -e '#{path.join(file)}' ] && cp '#{path.join(file)}' '#{shared_path.join(file)}'" + execute "if [ -e '#{path.join(file)}' ]; then cp '#{path.join(file)}' '#{shared_path.join(file)}'; fi" end end end