aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMartin Afanasjew2016-07-16 21:31:17 +0200
committerMartin Afanasjew2016-07-16 21:31:17 +0200
commitccb11935f612847145ffe95b3b70f23e621fd4aa (patch)
tree638595f328fe343aa871910e314c46082c05d556 /Library
parentf49233c89b18ca9789a9dcf85a5c52659d622b41 (diff)
downloadbrew-ccb11935f612847145ffe95b3b70f23e621fd4aa.tar.bz2
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.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/xcode.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 7733d4408..c5b7b3438 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?