Skip to content
Snippets Groups Projects
Commit 25baaa61 authored by Martin Afanasjew's avatar Martin Afanasjew
Browse files

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.
parent d363ae53
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment