diff options
| author | Forrest Fleming | 2015-09-26 00:24:23 -0700 |
|---|---|---|
| committer | Xu Cheng | 2015-10-06 15:13:25 +0800 |
| commit | e0f99945421243bc332002dec4f8e25220237aeb (patch) | |
| tree | fc911d2d29ebe5b8e28f1b4360290e61b36e6885 /Library/Homebrew/cmd/cleanup.rb | |
| parent | 9ae6f6d3acde2417f5e1ce7cb601f8c8629360df (diff) | |
| download | brew-e0f99945421243bc332002dec4f8e25220237aeb.tar.bz2 | |
Remove incomplete files in cache on `brew cleanup`
Closes Homebrew/homebrew#44182.
Closes Homebrew/homebrew#44349.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/cmd/cleanup.rb')
| -rw-r--r-- | Library/Homebrew/cmd/cleanup.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 0561510cb..ff9cd96cc 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -57,6 +57,10 @@ module Homebrew def cleanup_cache return unless HOMEBREW_CACHE.directory? HOMEBREW_CACHE.children.each do |path| + if path.to_s.end_with? ".incomplete" + cleanup_path(path) { path.unlink } + next + end if prune?(path) if path.file? cleanup_path(path) { path.unlink } |
