From f41925b360012b619ba7af48386cc95cb7d5623a Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Mon, 19 Oct 2015 18:11:25 +0800 Subject: [PATCH] allow install bottle unneeded formulae for non Xcode/CLT install --- Library/Homebrew/formula_installer.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 4cb3b17b17..18a41e7506 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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