diff options
| author | Markus Reiter | 2017-07-07 17:25:02 +0200 |
|---|---|---|
| committer | GitHub | 2017-07-07 17:25:02 +0200 |
| commit | 8ec08479ae71a849ea1e648ccda7a85771c14d01 (patch) | |
| tree | cdaeb06610024b42dad5a94da618968276449fda | |
| parent | 0740855f81e0ba845c412d48ff2188f4301b9f75 (diff) | |
| parent | 0217fb5d9ddbb1ef73e69cd299e591c60afa100b (diff) | |
| download | brew-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.rb | 5 |
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" |
