lib/capistrano/git-submodule-strategy.rb in capistrano-git-submodule-strategy-0.1.7 vs lib/capistrano/git-submodule-strategy.rb in capistrano-git-submodule-strategy-0.1.8

- old
+ new

@@ -33,10 +33,12 @@ # put the working tree in a release-branch, # make sure the submodules are up-to-date # and copy everything to the release path def release - git :clone, '--depth=1', '--recursive', '-b', fetch(:branch), "file://#{repo_path}", release_path - context.execute("find #{release_path} -name '.git*' | xargs -I {} rm -rfv {}") + unless context.test(:test, '-e', release_path) && context.test(:ls, '-A', release_path) + git :clone, '--depth=1', '--recursive', '-b', fetch(:branch), "file://#{repo_path}", release_path + context.execute("find #{release_path} -name '.git*' | xargs -I {} rm -rfv {}") + end end end end