aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMax Howell2012-08-06 19:28:39 -0400
committerMax Howell2012-08-06 19:28:39 -0400
commit1f622843844e5d52d598c2f8be360a13416454c9 (patch)
tree8954cc55e30be6aa4da2306500c815a3c63e4a88 /Library/Homebrew/cmd
parentda692fadc603e1d39998cfde6790fbfdc2a8fc2c (diff)
downloadbrew-1f622843844e5d52d598c2f8be360a13416454c9.tar.bz2
Restore check for broken xcode-select path
How did this get removed? Had a bug today where user had this but no doctor check so I was confused!
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index aa120c7aa..aef52da87 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -392,8 +392,14 @@ end
def check_xcode_select_path
# with the advent of CLT-only support, we don't need xcode-select
- return if MacOS::CLT.installed?
- unless File.file? "#{MacOS::Xcode.folder}/usr/bin/xcodebuild" and not MacOS::Xcode.bad_xcode_select_path?
+
+ if MacOS::Xcode.bad_xcode_select_path?
+ <<-EOS.undent
+ Your xcode-select path is set to /
+ You must unset it or builds will hang:
+ sudo rm /usr/share/xcode-select/xcode_dir_link
+ EOS
+ elsif not MacOS::CLT.installed? and not File.file? "#{MacOS::Xcode.folder}/usr/bin/xcodebuild"
path = MacOS.app_with_bundle_id(MacOS::Xcode::V4_BUNDLE_ID) || MacOS.app_with_bundle_id(MacOS::Xcode::V3_BUNDLE_ID)
path = '/Developer' if path.nil? or not path.directory?
<<-EOS.undent