-
Notifications
You must be signed in to change notification settings - Fork 43
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
brew install
causing undesired updates and crashing other Homebrew pkgs (macOS-only)
#68
Comments
You can disable to brew auto-update behavior.
|
Or better I can probably add |
I'm definitely adding this I would never expect an Erlang library to touch my Homebrew setup without my consent. It's a system pkg manager, users have custom setups on top of it. A library should not assume it's OK to touch system pkgs and there will be undesired side effects. If it needs the presence of some packages (which is the case), the best option is to inform the user and delegate him the task of installing it (running the necessary |
Yes I will add |
Fixed on master |
I recently had issues while building erlkaf on macOS due to its attempt to install its dependencies through a forced
brew install
.During the process, Homebrew ran some auto-update (
brew update --auto-update
) which caused some unrelated packages to break. I had to spend some minutes figuring out what had happened, and how amix deps.get
could potentially break my Homebrew – and then I could this snippet:It's pretty bad to touch system packages during the build of a library since it can potentially affect other packages like the scenario I ran into. So, I would recommend removing this snippet from the build scripts, replacing it with a clear doc section about system requirements (in macOS specifically, suggest Homebrew packages as a recommendation – though people could also use alternative methods like nixpkgs, etc.), and possibly failing the build when necessary with some informative error messages stating that system requirements were not met.
I think we could accomplish this by checking if some binaries and/or environment variables are set. I do similar things in my
.zshrc
to configure my shell if/when it's on a Homebrew-powered macOS (eg.: https://github.com/joeljuca/cli/blob/main/config/zsh/zshrc.sh#L70-L77).PS: I'm not a great shell programmer, but I imagine a couple of
if
blocks could do the trick.The text was updated successfully, but these errors were encountered: