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
untap: add --force switch #9489
Conversation
Review period will end on 2020-12-10 at 21:52:38 UTC. |
583c622
to
717479d
Compare
I find this logic is inverse to anything else switched by |
We should make this:
|
Library/Homebrew/cmd/untap.rb
Outdated
installed_tap_formulae = Formula.installed.select { |formula| formula.tap == tap } | ||
installed_tap_casks = Cask::Caskroom.casks.select { |cask| cask.tap == tap } | ||
|
||
if installed_tap_formulae.length.positive? || installed_tap_casks.length.positive? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if installed_tap_formulae.length.positive? || installed_tap_casks.length.positive? | |
if installed_tap_formulae.any? || installed_tap_casks.any? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if installed_tap_formulae.length.positive? || installed_tap_casks.length.positive? | |
if installed_tap_formulae.present? || installed_tap_casks.present? |
Library/Homebrew/cmd/untap.rb
Outdated
installed_tap_formulae = Formula.installed.select { |formula| formula.tap == tap } | ||
installed_tap_casks = Cask::Caskroom.casks.select { |cask| cask.tap == tap } | ||
|
||
if installed_tap_formulae.length.positive? || installed_tap_casks.length.positive? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if installed_tap_formulae.length.positive? || installed_tap_casks.length.positive? | |
if installed_tap_formulae.present? || installed_tap_casks.present? |
Co-authored-by: Eric Knibbe <enk3@outlook.com>
Review period ended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. The way this is implemented in the PR is consistent with how |
Another take on: #9422
Changes in comparison to previous PR:
if HOMEBREW_DEVELOPER env variable is set and there are tap formulae or casks installed, print warning instead of dying
assing formulae and casks name to variable, so we avoid duplicated logic
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 style
with your changes locally?Have you successfully run
brew tests
with your changes locally?Have you successfully run
brew man
locally and committed any changes?