From bb5e0812fb387f2b2a920c9a89e9750fe28943f8 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 2 Apr 2014 19:58:15 -0500 Subject: [PATCH] Add fast path for CVS dep The search mechanism in MacOS::Xcode is very slow. It requires shelling out at least twice, and possibly a third time (in the CLT-only case). Calling provides_cvs? activates this in order to determine the Xcode version. But if we know that there isn't an Xcode available for the current OS that meets the criteria, we can avoid this check entirely. --- Library/Homebrew/dependency_collector.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb index f0df900650..24214b1886 100644 --- a/Library/Homebrew/dependency_collector.rb +++ b/Library/Homebrew/dependency_collector.rb @@ -170,7 +170,7 @@ class DependencyCollector when strategy <= BazaarDownloadStrategy Dependency.new("bazaar", tags) when strategy <= CVSDownloadStrategy - Dependency.new("cvs", tags) unless MacOS::Xcode.provides_cvs? + Dependency.new("cvs", tags) if MacOS.version >= :mavericks || !MacOS::Xcode.provides_cvs? when strategy < AbstractDownloadStrategy # allow unknown strategies to pass through else