From 20c150fb8c6d861a40473348870a7c7a3f4e7f2f Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 15 Apr 2014 11:28:52 -0500 Subject: [PATCH] Xcode.bad_xcode_select_path? is used only once, so inline it --- Library/Homebrew/os/mac/xcode.rb | 5 ----- Library/brew.rb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index b7447d4e30..cb19eaf8af 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -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" diff --git a/Library/brew.rb b/Library/brew.rb index 5b2bc1ccf4..a274979120 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -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.