Fix 'brew install f' for already-installed brews.

This commit is contained in:
Adam Vandenberg 2011-03-09 21:01:23 -08:00
parent 5a30768377
commit bb58511b31
2 changed files with 9 additions and 12 deletions

View File

@ -35,10 +35,7 @@ module Homebrew
class InstallationError < RuntimeError
attr :formula
def initialize formula
@formula = formula
end
def initialize formula, message
def initialize formula, message=""
super message
@formula = formula
end

View File

@ -13,7 +13,8 @@ class FormulaInstaller
def go
if @f.installed? and not ARGV.force?
raise FormulaAlreadyInstalledError, @f
else
end
unless ignore_deps
@f.recursive_deps.each do |dep|
FormulaInstaller.install_formula dep unless dep.installed?
@ -22,7 +23,6 @@ class FormulaInstaller
end
FormulaInstaller.install_formula @f
end
end
def self.check_external_deps f
[:ruby, :python, :perl, :jruby].each do |type|