allow install bottle unneeded formulae for non Xcode/CLT install

This commit is contained in:
Xu Cheng 2015-10-19 18:11:25 +08:00
parent c4067cf8bb
commit f41925b360

View File

@ -164,7 +164,7 @@ class FormulaInstaller
check_conflicts
if !pour_bottle? && !MacOS.has_apple_developer_tools?
if !pour_bottle? && !formula.bottle_unneeded? && !MacOS.has_apple_developer_tools?
raise BuildToolsError.new([formula])
end
@ -256,7 +256,10 @@ class FormulaInstaller
# abnormally with a BuildToolsError if one or more don't.
# Only invoked when the user has no developer tools.
def check_dependencies_bottled(deps)
unbottled = deps.reject { |dep, _| dep.to_formula.pour_bottle? }
unbottled = deps.reject do |dep, _|
dep_f = dep.to_formula
dep_f.pour_bottle? || dep_f.bottle_unneeded?
end
raise BuildToolsError.new(unbottled) unless unbottled.empty?
end