diff options
| author | Martin Afanasjew | 2016-06-05 12:46:43 +0200 |
|---|---|---|
| committer | Martin Afanasjew | 2016-06-05 12:49:38 +0200 |
| commit | 25baaa61acc8743e69032233823a5ac33858d49e (patch) | |
| tree | bd8ac1ddbcab6a59717db7b32a261b6473f4ba1f /Library/Homebrew/formula_support.rb | |
| parent | d363ae53c08abd7e658a0124e7d3bb79d38a1f08 (diff) | |
| download | brew-25baaa61acc8743e69032233823a5ac33858d49e.tar.bz2 | |
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.
Diffstat (limited to 'Library/Homebrew/formula_support.rb')
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index cff456fb4..c649bf502 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -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 |
