From bb5e0812fb387f2b2a920c9a89e9750fe28943f8 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 2 Apr 2014 19:58:15 -0500 Subject: 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(-) (limited to 'Library') diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb index f0df90065..24214b188 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 -- cgit v1.2.3