diff options
| author | Xu Cheng | 2015-09-04 21:27:46 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-09-06 15:00:45 +0800 |
| commit | 8830e401a9332abd6d75261a7116851a2a9c135b (patch) | |
| tree | b333a93739d2e9ecfc4a7d7d9e2990082bc74142 /Library | |
| parent | b505c65b78fdb481c1c40f7a1655663aabf56548 (diff) | |
| download | brew-8830e401a9332abd6d75261a7116851a2a9c135b.tar.bz2 | |
formula_installer: check has_apple_developer_tools? once
Closes Homebrew/homebrew#43534.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 72ae9a87e..c997176f9 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -162,7 +162,7 @@ class FormulaInstaller unless ignore_deps? deps = compute_dependencies - check_dependencies_bottled(deps) if pour_bottle? + check_dependencies_bottled(deps) if pour_bottle? && !MacOS.has_apple_developer_tools? install_dependencies(deps) end @@ -248,10 +248,7 @@ 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.select do |dep, _| - formula = dep.to_formula - !formula.pour_bottle? && !MacOS.has_apple_developer_tools? - end + unbottled = deps.reject { |dep, _| dep.to_formula.pour_bottle? } raise BuildToolsError.new(unbottled) unless unbottled.empty? end |
