Skip to content

Commit

Permalink
Merge pull request #1995 from aeroastro/feature/avoid-using-string
Browse files Browse the repository at this point in the history
Simplify code on removing old directories by skipping `Array#join`
  • Loading branch information
mattbrictson committed Jul 5, 2018
2 parents 220db8f + ad9c0a4 commit 86362cf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/capistrano/tasks/deploy.rake
Expand Up @@ -168,8 +168,7 @@ namespace :deploy do
debug t(:no_current_release, host: host.to_s)
end
if directories.any?
directories_str = directories.join(" ")
execute :rm, "-rf", directories_str
execute :rm, "-rf", *directories
else
info t(:no_old_releases, host: host.to_s, keep_releases: fetch(:keep_releases))
end
Expand Down

0 comments on commit 86362cf

Please sign in to comment.