formula: update pour_bottle? CLT error message

We have received multiple bug reports from users complaining that `brew`
tells them to install the CLT when they already have Xcode installed.
See, for example, #18976.

Let's try to avoid these issues from being opened by making the error
message more explicit that we require the CLT at a specific location,
and that installing Xcode does not suffice.
This commit is contained in:
Carlo Cabrera 2024-12-21 19:39:04 +08:00 committed by Carlo Cabrera
parent 1d471a2a19
commit 9abfafbd40
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -4286,9 +4286,11 @@ class Formula
lambda do |_|
on_macos do
T.bind(self, PourBottleCheck)
reason(+<<~EOS)
The bottle needs the Apple Command Line Tools to be installed.
You can install them, if desired, with:
reason(<<~EOS)
The bottle needs the Xcode Command Line Tools to be installed at /Library/Developer/CommandLineTools.
Development tools provided by Xcode.app are not sufficient.
You can install the Xcode Command Line Tools, if desired, with:
xcode-select --install
EOS
satisfy { MacOS::CLT.installed? }