1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Merge pull request #1995 from aeroastro/feature/avoid-using-string

Simplify code on removing old directories by skipping `Array#join`
This commit is contained in:
Matt Brictson 2018-07-05 07:39:38 -07:00 committed by GitHub
commit 86362cf727
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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