os/mac/diagnostic: output non-default Xcode prefix.

This should help people find it when this is a fatal error (and they
don't look at `brew config`).
This commit is contained in:
Mike McQuaid 2018-11-28 14:25:36 +00:00
parent aed895cdc1
commit 6c49c878cd
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -111,9 +111,11 @@ module Homebrew
def check_xcode_minimum_version
return unless MacOS::Xcode.below_minimum_version?
xcode = MacOS::Xcode.version.to_s
xcode += " => #{MacOS::Xcode.prefix}" unless MacOS::Xcode.default_prefix?
<<~EOS
Your Xcode (#{MacOS::Xcode.version}) is too outdated.
Your Xcode (#{xcode}) is too outdated.
Please update to Xcode #{MacOS::Xcode.latest_version} (or delete it).
#{MacOS::Xcode.update_instructions}
EOS