Xcode.bad_xcode_select_path? is used only once, so inline it

This commit is contained in:
Jack Nagel 2014-04-15 11:28:52 -05:00
parent a55e670a8a
commit 20c150fb8c
2 changed files with 1 additions and 6 deletions

View File

@ -14,11 +14,6 @@ module OS
@folder ||= `xcode-select -print-path 2>/dev/null`.strip
end
# Xcode 4.3 tools hang if "/" is set
def bad_xcode_select_path?
folder == "/"
end
def latest_version
case MacOS.version
when "10.4" then "2.5"

View File

@ -34,7 +34,7 @@ end
# Check for bad xcode-select before anything else, because `doctor` and
# many other things will hang
# Note that this bug was fixed in 10.9
if OS.mac? && MacOS.version < :mavericks && MacOS::Xcode.bad_xcode_select_path?
if OS.mac? && MacOS.version < :mavericks && MacOS::Xcode.folder == "/"
odie <<-EOS.undent
Your xcode-select path is currently set to '/'.
This causes the `xcrun` tool to hang, and can render Homebrew unusable.