diff options
| author | Max Howell | 2012-08-19 17:36:10 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-21 12:09:05 -0400 |
| commit | c5552506c8209fbc04179bf4f49d10f972b3a16a (patch) | |
| tree | 1efcc7fe6051e11e095e9b0d9b3bead5b2e961d2 /Library | |
| parent | bf26ced41db225bf4db8673df62ed05d3523d1a3 (diff) | |
| download | homebrew-c5552506c8209fbc04179bf4f49d10f972b3a16a.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 |
