Skip to content

Commit

Permalink
formula: update pour_bottle? CLT error message
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
carlocab committed Dec 21, 2024
1 parent 1d471a2 commit 9abfafb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4286,9 +4286,11 @@ def pour_bottle?(only_if: nil, &block)
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)

Check warning on line 4289 in Library/Homebrew/formula.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/formula.rb#L4289

Added line #L4289 was not covered by tests
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? }
Expand Down

0 comments on commit 9abfafb

Please sign in to comment.