Requirement: support tap formula as default_formula

Closes Homebrew/homebrew#43107.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-08-20 16:15:31 +08:00
parent 0bce3b3f36
commit fe830e4099

View File

@ -117,8 +117,12 @@ class Requirement
def to_dependency
f = self.class.default_formula
raise "No default formula defined for #{inspect}" if f.nil?
if HOMEBREW_TAP_FORMULA_REGEX === f
TapDependency.new(f, tags, method(:modify_build_environment), name)
else
Dependency.new(f, tags, method(:modify_build_environment), name)
end
end
private