diff options
| author | Adam Vandenberg | 2012-07-23 17:06:38 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-07 10:49:45 -0700 |
| commit | d42d796653601942dac027159a31161f5ca1c13e (patch) | |
| tree | ec47fd7a048b2cf2b59282aa7ff9081eac4722d7 /Library/Homebrew/exceptions.rb | |
| parent | b118005384fe0f54de5543bfcf6e6153f2e38193 (diff) | |
| download | homebrew-d42d796653601942dac027159a31161f5ca1c13e.tar.bz2 | |
Allow multiple unsatisfied fatal requirements
Closes #13335.
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 6ebc40e1c..9ed6646f1 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -65,12 +65,15 @@ class FormulaInstallationAlreadyAttemptedError < Homebrew::InstallationError end end -class UnsatisfiedRequirement < Homebrew::InstallationError - attr :dep - - def initialize formula, dep - @dep = dep - super formula, "An unsatisfied requirement failed this build." +class UnsatisfiedRequirements < Homebrew::InstallationError + attr :reqs + + def initialize formula, reqs + @reqs = reqs + message = (reqs.length == 1) \ + ? "An unsatisfied requirement failed this build." \ + : "Unsatisifed requirements failed this build." + super formula, message end end |
