Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove redundant condition check in copy strategy.

  • Loading branch information...
commit a4fc630027dccd6ee160cdbba026357138fbd046 1 parent 7120c4a
@maxim maxim authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 lib/capistrano/recipes/deploy/strategy/copy.rb
View
13 lib/capistrano/recipes/deploy/strategy/copy.rb
@@ -86,13 +86,12 @@ def deploy!
if copy_exclude.any?
logger.debug "processing exclusions..."
- if copy_exclude.any?
- copy_exclude.each do |pattern|
- delete_list = Dir.glob(File.join(destination, pattern), File::FNM_DOTMATCH)
- # avoid the /.. trap that deletes the parent directories
- delete_list.delete_if { |dir| dir =~ /\/\.\.$/ }
- FileUtils.rm_rf(delete_list.compact)
- end
+
+ copy_exclude.each do |pattern|
+ delete_list = Dir.glob(File.join(destination, pattern), File::FNM_DOTMATCH)
+ # avoid the /.. trap that deletes the parent directories
+ delete_list.delete_if { |dir| dir =~ /\/\.\.$/ }
+ FileUtils.rm_rf(delete_list.compact)
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.