dashlane-cli
dashlane-cli copied to clipboard
Brew install fails if corepack is install via brew
Describe the bug
If corepack is installed via brew (brew install corepack
) the install will fail with the following:
==> Installing dashlane/tap/dashlane-cli dependency: yarn
Error: Cannot install yarn because conflicting formulae are installed.
corepack: because both install `yarn` and `yarnpkg` binaries
Please `brew unlink corepack` before continuing.
Unlinking removes a formula's symlinks from /opt/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.
To Reproduce Steps to reproduce the behavior:
-
brew install corepack
-
brew install dashlane/tap/dashlane-cli
- See error
Expected behavior dashlane cli installs
Environment (please complete the following information):
- OS: MacOS 14.2.1
Thanks for sharing this issue, I'll work on it when I have some time/
I've looked around and this issue is not directly linked to our package.
We need yarn
to build the CLI, but as specified in the code source of yarn.rb package, yarn is not compatible with corepack and hadoop because it's already shipped inside.
One of the solution I'm looking at is to allow a flag to be set if you have corepack
installed.
Generic syntax example:
option 'with-Q', 'Depend on Q instead of P'
depends_on 'P' if !build.with?('Q')
depends_on 'Q' if build.with?('Q')
So something like:
option 'with-corepack', 'Use yarn from corepack instead of installing it'
depends_on 'yarn' if !build.with?('corepack')
depends_on 'corepack' if build.with?('corepack')