diff options
| author | Max Howell | 2012-08-19 17:36:10 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-21 12:09:05 -0400 |
| commit | 4e7bb6c63766b457d07641e881da32a90f3f5872 (patch) | |
| tree | 05fa77540cad609d6dc8b19dcfd9b681acd65e34 /Library | |
| parent | 9274f7cda1e2261e581979887ca15ba41fef6bd9 (diff) | |
| download | brew-4e7bb6c63766b457d07641e881da32a90f3f5872.tar.bz2 | |
Better message if multiple kegs need linking
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 06ac93975..9cbe5f235 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -40,12 +40,13 @@ class FormulaInstaller raise CannotInstallFormulaError, "No head is defined for #{f.name}" end - f.recursive_deps.each do |dep| - if dep.installed? and not dep.keg_only? and not dep.linked_keg.directory? - raise CannotInstallFormulaError, - "You must `brew link #{dep}' before #{f} can be installed" + unless ignore_deps + unlinked_deps = f.recursive_deps.select do |dep| + dep.installed? and not dep.keg_only? and not dep.linked_keg.directory? end - end unless ignore_deps + raise CannotInstallFormulaError, + "You must `brew link #{unlinked_deps*' '}' before #{f} can be installed" unless unlinked_deps.empty? + end rescue FormulaUnavailableError => e # this is sometimes wrong if the dependency chain is more than one deep |
