aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
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"