mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Simplify code on removing old directories by skipping Array#join
`execute(*)` provided by SSHKit internally joins arguments with space for the command to be executed. As it is the responsibility of SSHKit, we can skip the code at Capistrano layer.
This commit is contained in:
parent
220db8faba
commit
ad9c0a4555
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue