Check existence of target keg instead of hiding exceptions

This commit is contained in:
Jack Nagel 2014-03-24 10:28:49 -05:00
parent e4f291084a
commit a72061c59a
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ module Homebrew extend self
end
def upgrade_formula f
outdated_keg = Keg.new(f.linked_keg.realpath) rescue nil
outdated_keg = Keg.new(f.linked_keg.realpath) if f.linked_keg.directory?
fi = FormulaInstaller.new(f)
fi.options = Tab.for_formula(f).used_options

View File

@ -351,7 +351,7 @@ class FormulaInstaller
def install_dependency(dep, inherited_options)
df = dep.to_formula
outdated_keg = Keg.new(df.linked_keg.realpath) rescue nil
outdated_keg = Keg.new(df.linked_keg.realpath) if df.linked_keg.directory?
fi = DependencyInstaller.new(df)
fi.options |= Tab.for_formula(df).used_options