diff options
| author | Adam Vandenberg | 2011-03-09 21:01:23 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2011-03-12 11:55:08 -0800 |
| commit | bb58511b31c124c81c305b9d67706f5347ec704e (patch) | |
| tree | 5623501f6b4fd1b5928d63bafd28d6c44d91b84b /Library/Homebrew | |
| parent | 5a30768377e97dd6d98f991edbb4ebee5de62e23 (diff) | |
| download | brew-bb58511b31c124c81c305b9d67706f5347ec704e.tar.bz2 | |
Fix 'brew install f' for already-installed brews.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 14 |
2 files changed, 8 insertions, 11 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 66ae2b294..28b46198e 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -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 diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 06847dfbc..497f2a2ef 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -13,15 +13,15 @@ class FormulaInstaller def go if @f.installed? and not ARGV.force? raise FormulaAlreadyInstalledError, @f - else - unless ignore_deps - @f.recursive_deps.each do |dep| - FormulaInstaller.install_formula dep unless dep.installed? - end - FormulaInstaller.check_external_deps @f + end + + unless ignore_deps + @f.recursive_deps.each do |dep| + FormulaInstaller.install_formula dep unless dep.installed? end - FormulaInstaller.install_formula @f + FormulaInstaller.check_external_deps @f end + FormulaInstaller.install_formula @f end def self.check_external_deps f |
