aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
diff options
context:
space:
mode:
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