Allow dependencies to still install

Oops bug.
This commit is contained in:
Max Howell 2012-03-07 13:48:04 +00:00
parent d830e17a12
commit 8fd2778a95
2 changed files with 8 additions and 3 deletions

View File

@ -63,7 +63,7 @@ module Homebrew extend self
installer.install
installer.caveats
installer.finish # includes link step
installer.finish
rescue CannotInstallFormulaError => e
onoe e
rescue BuildError => e
@ -71,7 +71,7 @@ module Homebrew extend self
puts
ensure
# restore previous installation state if build failed
outdated_keg.link if outdated_keg and not f.linked_keg.directory?
outdated_keg.link if outdated_keg and not f.installed? rescue nil
end
end

View File

@ -91,14 +91,19 @@ class FormulaInstaller
end
def install_dependency dep
outdated_keg = Keg.new(dep.linked_keg.realpath) rescue nil
fi = FormulaInstaller.new dep
fi.ignore_deps = true
fi.show_header = false
oh1 "Installing #{f} dependency: #{dep}"
outdated_keg.unlink if outdated_keg
fi.install
Keg.new(dep.linked_keg.realpath).unlink if dep.linked_keg.directory?
fi.caveats
fi.finish
ensure
# restore previous installation state if build failed
outdated_keg.link if outdated_keg and not dep.installed? rescue nil
end
def caveats