aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-07-07 17:25:02 +0200
committerGitHub2017-07-07 17:25:02 +0200
commit8ec08479ae71a849ea1e648ccda7a85771c14d01 (patch)
treecdaeb06610024b42dad5a94da618968276449fda
parent0740855f81e0ba845c412d48ff2188f4301b9f75 (diff)
parent0217fb5d9ddbb1ef73e69cd299e591c60afa100b (diff)
downloadbrew-8ec08479ae71a849ea1e648ccda7a85771c14d01.tar.bz2
Merge pull request #2865 from reitermarkus/cleanup-directories
Also remove directories with `brew cask cleanup`.
-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"