From babf25af1ab2f52af011195af0bfb101f114f1db Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Wed, 24 Oct 2012 11:16:57 -0700 Subject: [PATCH] doctor: check that Xcode prefix actually exists Closes Homebrew/homebrew#14373. --- Library/Homebrew/cmd/doctor.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 0d5e3c2c43..ca837539f5 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -390,6 +390,18 @@ def check_xcode_prefix end end +def check_xcode_prefix_exists + prefix = MacOS::Xcode.prefix + return if prefix.nil? + unless prefix.exist? + <<-EOS.undent + The folder Xcode is reportedly installed to doesn't exist: + #{prefix} + You may need to `xcode-select` the proper path if you have moved Xcode. + EOS + end +end + def check_xcode_select_path # with the advent of CLT-only support, we don't need xcode-select