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.
This commit is contained in:
Martin Afanasjew 2016-07-16 21:31:17 +02:00
parent f49233c89b
commit ccb11935f6

View File

@ -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?