top | item 26037153

(no title)

thomaslkjeldsen | 5 years ago

Running `brew install hello` triggers `brew update` automatically unless the environment variable HOMEBREW_NO_AUTO_UPDATE is set:

echo export HOMEBREW_NO_AUTO_UPDATE=1 >> $HOME/.zshrc

I do not think it was a wise decision to enable auto update on `brew install` as long time users expect `brew update` and `brew install` to be two separate steps (as it was for years) and because Homebrew no longer operates like `apt` and other package managers.

Looks like it was changed in 2016: https://github.com/Homebrew/brew/issues/288

discuss

order

jrochkind1|5 years ago

It makes sense semantically to me, and would be fine/preferable if `brew update` only took a few seconds to complete.

Cause otherwise I'm not necessarily going to remember to brew update ever, and am going to be getting old formulae. I think I'm not alone, I suspect this was done because too many users were never updating.

I am not super familair with how apt works, but I think the "workflows" of brew are already different than typical apt uses, with continuous incremental releases, and users expected to stay up to date with them -- things aren't necessarily going to keep working (installing properly) if you never run `brew update`, and I think many users were not.

I do want `brew install` to get me the latest formula for the thing I'm installing.

The problem is when it can add several minutes to a `brew install` invocation, interupting my ability to get on with my business.

But good to know about the env variable so at least I can choose which tradeoff I want!