Don't clean up lockfiles if the directory doesn't exist
Fixes Homebrew/homebrew#20673.
This commit is contained in:
parent
3b56cb02ea
commit
c0eb1f10de
@ -84,6 +84,7 @@ module Homebrew extend self
|
||||
end
|
||||
|
||||
def cleanup_lockfiles
|
||||
return unless HOMEBREW_CACHE_FORMULA.directory?
|
||||
candidates = HOMEBREW_CACHE_FORMULA.children
|
||||
lockfiles = candidates.select { |f| f.file? && f.extname == '.brewing' }
|
||||
lockfiles.select(&:readable?).each do |file|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user