Fix cleanup for head-only formulae

Fixes Homebrew/homebrew#27265.
This commit is contained in:
Jack Nagel 2014-03-06 09:50:44 -06:00
parent 5c51c85564
commit 037acb81c8

View File

@ -68,8 +68,8 @@ module Homebrew extend self
next
end
v = f.stable.version || f.devel.version || f.head.version
if v > version || ARGV.switch?('s') && !f.installed? || bottle_file_outdated?(f, file)
spec = f.stable || f.devel || f.head
if spec.version > version || ARGV.switch?('s') && !f.installed? || bottle_file_outdated?(f, file)
cleanup_cached_file(file)
end
end