diff options
| author | Jack Nagel | 2014-04-01 18:40:20 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-01 18:40:20 -0500 |
| commit | 66c8f2707c0bd24a356e9fb485c039795d93b246 (patch) | |
| tree | 014e17f42a09e18b1789e7c079bc8c05deecd37f /Library | |
| parent | 2932bc5347e27941799375e06aa8b2dc4c53bdc4 (diff) | |
| download | brew-66c8f2707c0bd24a356e9fb485c039795d93b246.tar.bz2 | |
Reorganize conditional to avoid shelling out if possible
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/brew.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/brew.rb b/Library/brew.rb index 27d66d20f..484ee3bca 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -34,8 +34,8 @@ 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? && `xcode-select -print-path 2>/dev/null`.chomp == '/' && MacOS.version < :mavericks - ofail <<-EOS.undent +if OS.mac? && MacOS.version < :mavericks && MacOS::Xcode.bad_xcode_select_path? + odie <<-EOS.undent Your xcode-select path is currently set to '/'. This causes the `xcrun` tool to hang, and can render Homebrew unusable. If you are using Xcode, you should: @@ -43,8 +43,6 @@ if OS.mac? && `xcode-select -print-path 2>/dev/null`.chomp == '/' && MacOS.versi Otherwise, you should: sudo rm -rf /usr/share/xcode-select EOS - - exit 1 end case HOMEBREW_PREFIX.to_s when '/', '/usr' |
