aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2012-07-23 17:06:38 -0700
committerAdam Vandenberg2012-08-07 10:49:45 -0700
commitd42d796653601942dac027159a31161f5ca1c13e (patch)
treeec47fd7a048b2cf2b59282aa7ff9081eac4722d7 /Library/Homebrew/exceptions.rb
parentb118005384fe0f54de5543bfcf6e6153f2e38193 (diff)
downloadhomebrew-d42d796653601942dac027159a31161f5ca1c13e.tar.bz2
Allow multiple unsatisfied fatal requirements
Closes #13335.
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb15
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