Skip to content

Conversation

@botantony
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

I noticed this problem with shell completions where it doesn't suggest anything that starts with lib. brew formulae | grew '^lib' doesn't show anything either. We should keep lib/* path if it is inside Formula or Casks directory

Copilot AI review requested due to automatic review settings November 23, 2025 18:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where shell completions and brew formulae/brew casks commands were not suggesting formulae or casks with names starting with "lib". The issue occurred because the find command in items.sh was unconditionally pruning all directories named lib, which prevented discovery of formulae/casks in subdirectories like Formula/lib/ or Casks/lib/.

Key changes:

  • Modified the find command to conditionally prune lib directories only when they are NOT inside Formula or Casks directories
  • The fix preserves the exclusion of top-level lib/ directories while allowing traversal of lib/ subdirectories within formula and cask directories

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@botantony
Copy link
Member Author

#21120 (comment)

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

I noticed this problem with shell completions where it doesn't suggest
anything that starts with `lib`. `brew formulae | grew '^lib'` doesn't
show anything either. We should keep `lib/*` path if it is inside
`Formula` or `Casks` directory

Signed-off-by: botantony <antonsm21@gmail.com>
@botantony botantony force-pushed the missing-libraries-in-formula-list branch from 7100e83 to 91c2ab7 Compare November 24, 2025 12:50
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 24, 2025
Merged via the queue into main with commit 6e460ba Nov 24, 2025
35 checks passed
@MikeMcQuaid MikeMcQuaid deleted the missing-libraries-in-formula-list branch November 24, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants