formula_support: don't fail without CLT/Xcode
`Formula#keg_only?` could fail if it was invoked on a formula with a `:provided_until_xcode43` or `:provided_until_xcode5` reason given to `keg_only`, if neither the Command Line Tools nor Xcode was installed. Check whether Xcode is installed before querying the Xcode version. Closes #317.
This commit is contained in:
parent
d363ae53c0
commit
25baaa61ac
@ -18,9 +18,9 @@ class KegOnlyReason
|
||||
when :provided_pre_el_capitan
|
||||
MacOS.version < :el_capitan
|
||||
when :provided_until_xcode43
|
||||
MacOS::Xcode.version < "4.3"
|
||||
MacOS::Xcode.installed? && MacOS::Xcode.version < "4.3"
|
||||
when :provided_until_xcode5
|
||||
MacOS::Xcode.version < "5.0"
|
||||
MacOS::Xcode.installed? && MacOS::Xcode.version < "5.0"
|
||||
else
|
||||
true
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user