aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dependencies.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/dependencies.rb')
-rw-r--r--Library/Homebrew/dependencies.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/dependencies.rb b/Library/Homebrew/dependencies.rb
index e12cfb22a..be6e0cf9d 100644
--- a/Library/Homebrew/dependencies.rb
+++ b/Library/Homebrew/dependencies.rb
@@ -159,7 +159,9 @@ class Requirement
# Should return true if this requirement is met.
def satisfied?; false; end
# Should return true if not meeting this requirement should fail the build.
- def fatal?; false; end
+ def fatal?
+ self.class.fatal || false
+ end
# The message to show when the requirement is not met.
def message; ""; end
@@ -174,6 +176,12 @@ class Requirement
def hash
message.hash
end
+
+ class << self
+ def fatal(val=nil)
+ val.nil? ? @fatal : @fatal = val
+ end
+ end
end
require 'requirements'