aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2013-12-13 10:46:30 -0800
committerMisty De Meo2013-12-13 19:17:56 -0800
commit6beceadfed810346d0b544620a863c9da580bf26 (patch)
tree9e202071d153a641f6b8799372914c5ddb50eb67 /Library
parent89e5585ee176ac8c93df5d42c0a51c7964057cd2 (diff)
downloadhomebrew-6beceadfed810346d0b544620a863c9da580bf26.tar.bz2
xcode-select check: move after first options
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/brew.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/Library/brew.rb b/Library/brew.rb
index 0710f6bec..455f30464 100755
--- a/Library/brew.rb
+++ b/Library/brew.rb
@@ -16,22 +16,6 @@ $:.unshift(HOMEBREW_LIBRARY_PATH + '/vendor')
$:.unshift(HOMEBREW_LIBRARY_PATH)
require 'global'
-# 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 `xcode-select -print-path 2>/dev/null`.chomp == '/' && MacOS.version < :mavericks
- ofail <<-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:
- sudo xcode-select -switch /Applications/Xcode.app
- Otherwise, you should:
- sudo rm -rf /usr/share/xcode-select
- EOS
-
- exit 1
-end
-
case ARGV.first when '-h', '--help', '--usage', '-?', 'help', nil
require 'cmd/help'
puts Homebrew.help_s
@@ -47,6 +31,22 @@ when '-v'
exit 0 if ARGV.length == 1
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
+ 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:
+ sudo xcode-select -switch /Applications/Xcode.app
+ Otherwise, you should:
+ sudo rm -rf /usr/share/xcode-select
+ EOS
+
+ exit 1
+end
+
case HOMEBREW_PREFIX.to_s when '/', '/usr'
# it may work, but I only see pain this route and don't want to support it
abort "Cowardly refusing to continue at this prefix: #{HOMEBREW_PREFIX}"