Skip to content

bash-completion conflict #3

@kakawait

Description

@kakawait

I tried to follow that tutorial https://www.clever-cloud.com/devoxxfr (Yeah I will really like to be at DevoxxFR :)), I had a small issue.

Indeed, since I'm using bash-completion 2 (instead of bash-completion 1) I got the following error when running brew install CleverCloud/tap/clever-tools

 brew install CleverCloud/tap/clever-tools
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (caskroom/cask, caskroom/versions, homebrew/core).
==> Updated Formulae
openssl ✔       amber           apibuilder-cli  azure-cli       buku            dartsim         headphones      jbig2enc        languagetool    libatomic_ops   mame            mariadb@10.1    mediaconch      pygobject3      rust            typescript      yq
openssl@1.1 ✔   ant             artifactory     ballerina       bzt             dovecot         heroku          joplin          laszip          lmod            mariadb         media-info      pdal            rom-tools       terragrunt      webpack

==> Tapping clevercloud/tap
Cloning into '$HOME/.homebrew/Library/Taps/clevercloud/homebrew-tap'...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 6 (delta 1), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (6/6), done.
Tapped 1 formula (31 files, 23.8KB)
==> Installing clever-tools from clevercloud/tap
==> Installing dependencies for clevercloud/tap/clever-tools: bash-completion, zsh-completions
==> Installing clevercloud/tap/clever-tools dependency: bash-completion
Error: Cannot install bash-completion because conflicting formulae are installed.
  bash-completion@2: because Differing version of same formula

Please `brew unlink bash-completion@2` before continuing.

Unlinking removes a formula's symlinks from $HOME/.homebrew. You can
link the formula again after the install finishes. You can --force this
install, but the build may fail or cause obscure side-effects in the
resulting software.

Since I don't want to unlink my bash-completion@2 since I'm using it.

There is a simple by-pass

brew install --ignore-dependencies CleverCloud/tap/clever-tools
# or
brew install --without-bash-completion CleverCloud/tap/clever-tools

Why I opened that issue, since there is a bypass? In fact is more related about discussion on twitter with @waxzce https://twitter.com/waxzce/status/978905316124393472

So feel free to close it if not relevant.

I'm not Formulae expert dev so I don't know if it's possible to do some feature dectection like

If bash-completion@2 is installed then use it (with compatible completion if needed)
else bash-completion ...

Or make any {bash,zsh}-completion as :optional dependencies instead of :required

Or add some comment/doc to explain bypass for no advance user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions