Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore taps of unavailable formulae #1508

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tt
Copy link
Contributor

@tt tt commented Nov 24, 2024

This addresses an issue in #1495.

I set up a new machine and ran brew bundle cleanup --verbose which then exited with the following error:

Error: No available formula with the name "heroku/brew/heroku".
Please tap it and then try again: brew tap heroku/brew

This is because I hadn't installed anything and therefore Formulary.factory couldn't find the formula.

With this change, I'm making an assumption that if we can't find the formula, we don't need to keep its associated tap and therefore it's fine to ignore the exception and consequently not include the tap in kept_taps.

I would like to add a test case but TapFormulaUnavailableError isn't available and wasn't sure it was desired to define it for testing. Let me know if I should. I found spec/stub/exceptions.rb.

@tt tt force-pushed the ignore-taps-of-unavailable-formulae branch from 3ef2ab7 to c9d792c Compare November 24, 2024 08:00
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.

1 participant