aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMarkus Reiter2017-07-06 20:59:35 +0200
committerMarkus Reiter2017-07-06 20:59:35 +0200
commit0217fb5d9ddbb1ef73e69cd299e591c60afa100b (patch)
treec57041c9259cf41031b200f3abac2018d69c549b /Library/Homebrew
parentae33f5c79c8d21b3e45862945d8414fc6b95e6e9 (diff)
downloadbrew-0217fb5d9ddbb1ef73e69cd299e591c60afa100b.tar.bz2
Also remove directories with `brew cask cleanup`.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/cleanup.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/cleanup.rb b/Library/Homebrew/cask/lib/hbc/cli/cleanup.rb
index 356162db5..07ac71cd6 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/cleanup.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/cleanup.rb
@@ -79,9 +79,8 @@ module Hbc
begin
LockFile.new(item.basename).with_lock do
puts item
- item_size = File.size?(item)
- cleanup_size += item_size unless item_size.nil?
- item.unlink
+ cleanup_size += File.size(item)
+ item.rmtree
end
rescue OperationInProgressError
puts "skipping: #{item} is locked"