From ccb11935f612847145ffe95b3b70f23e621fd4aa Mon Sep 17 00:00:00 2001 From: Martin Afanasjew <martin@afanasjew.de> Date: Sat, 16 Jul 2016 21:31:17 +0200 Subject: [PATCH] os/mac/xcode: fix CVS/GCC check if no Xcode On systems prior to 10.9, formulae that use CVS as a download source check whether the installed Xcode already provides CVS to avoid adding a dependency on the `cvs` formula. Unfortunately, if no Xcode is installed the check fails with undefined method `<' for nil:NilClass causing the formula to become unloadable. This in turn causes some taps to be untappable since #396 added the `readall` check on `tap`. Closes #508. --- Library/Homebrew/os/mac/xcode.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 7733d44088..c5b7b34385 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -130,11 +130,11 @@ module OS end def provides_gcc? - version < "4.3" + installed? && version < "4.3" end def provides_cvs? - version < "5.0" + installed? && version < "5.0" end def default_prefix? -- GitLab