aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2016-09-09 22:10:43 +0100
committerDominyk Tiller2016-09-10 16:30:22 +0100
commitaa3ce859a70b101735f98576e8cb9c659dc6ba6d (patch)
tree588f3cde8e4e8491657426acf62f2ab214fb743e /Library
parentcfc930011d2fff0b4d3a8befc290ffe6b69d4405 (diff)
downloadbrew-aa3ce859a70b101735f98576e8cb9c659dc6ba6d.tar.bz2
diagnostic: tweak check_xcode_up_to_date messaging
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/os/mac/diagnostic.rb20
1 files changed, 12 insertions, 8 deletions
diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb
index a2f715890..7fb13af85 100644
--- a/Library/Homebrew/extend/os/mac/diagnostic.rb
+++ b/Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -63,18 +63,22 @@ module Homebrew
def check_xcode_up_to_date
return unless MacOS::Xcode.installed? && MacOS::Xcode.outdated?
+ message = <<-EOS.undent
+ Your Xcode (#{MacOS::Xcode.version}) is outdated
+ Please update to Xcode #{MacOS::Xcode.latest_version}.
+ #{MacOS::Xcode.update_instructions}
+ EOS
+
if OS::Mac.prerelease?
- xcode_select_nudge = <<-EOS.undent
+ current_path = Utils.popen_read("/usr/bin/xcode-select", "-p")
+ message += <<-EOS.undent
If #{MacOS::Xcode.latest_version} is installed, you may need to:
- sudo xcode-select --switch /path/to/Xcode-beta.app
+ sudo xcode-select --switch /Applications/Xcode.app
+ Current developer directory is:
+ #{current_path}
EOS
end
-
- <<-EOS.undent
- Your Xcode (#{MacOS::Xcode.version}) is outdated
- Please update to Xcode #{MacOS::Xcode.latest_version}.
- #{MacOS::Xcode.update_instructions}#{xcode_select_nudge}
- EOS
+ message
end
def check_clt_up_to_date