brew-cleanup: check whether keg is a directory.
* Avoid problem when encountering `.DS_Store' in Cellar. Closes Homebrew/homebrew#16356. Closes Homebrew/homebrew#16388. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
f5f5c2188b
commit
5d7940228e
@ -33,7 +33,7 @@ module Homebrew extend self
|
||||
|
||||
if f.installed? and f.rack.directory?
|
||||
f.rack.children.each do |keg|
|
||||
if f.version > Keg.new(keg).version
|
||||
if File.directory? keg and f.version > Keg.new(keg).version
|
||||
if f.can_cleanup?
|
||||
if ARGV.dry_run?
|
||||
puts "Would remove: #{keg}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user