This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

brew-cleanup: check whether keg is a directory.

* Avoid problem when encountering `.DS_Store' in Cellar.

Closes #16356.
Closes #16388.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information...
manphiz authored and MikeMcQuaid committed Dec 4, 2012
1 parent 537d64e commit dc19acc2b42c5bed5a50b5bc765784d4fcd9bed7
Showing with 1 addition and 1 deletion.
  1. +1 −1 Library/Homebrew/cmd/cleanup.rb
@@ -33,7 +33,7 @@ def cleanup_formula f
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}"

0 comments on commit dc19acc

Please sign in to comment.