Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.28k stars 9.7k forks source link

Installing brew from PKG should add itself to PATH #16525

Closed TomAuger closed 9 months ago

TomAuger commented 9 months ago

Verification

Provide a detailed description of the proposed feature

The brew homepage seems to encourage using the new .pkg to install homebrew easily, as opposed to the previous script install. This does not add brew to the PATH, but the instructions for doing so are

a) hard to notice (I had to run the installer a second time to even notice the instructions) b) obscure for non-savvy users (it doesn't provide the exact mechanism for adding to the PATH - resulting in time wasted googling a whole bunch of stuff

If possible, i would recommend the PKG installer determine the default terminal shell, and ask whether to add to the PATH - this is pretty common with a variety of software.

What is the motivation for the feature?

Brew is supposed to make installing complex dependencies easy, for all user levels. While one would wish all command line users understand the intricacies of adding things to their PATH, ii reality, the whole reason many people use Brew is to avoid having to get into the weeds about that sort of thing.

If you want a truly awesome user experience and you're pushing this new PKG installer, I would highly recommend solving "the last mile" while is adding Brew to PATH.

I was quite disappointed after installing the PKG that opening a new terminal and typing "which brew" resulted in an unknown command.

How will the feature be relevant to at least 90% of Homebrew users?

sorry, gonna re-paste this:

Brew is supposed to make installing complex dependencies easy, for all user levels. While one would wish all command line users understand the intricacies of adding things to their PATH, ii reality, the whole reason many people use Brew is to avoid having to get into the weeds about that sort of thing.

If you want a truly awesome user experience and you're pushing this new PKG installer, I would highly recommend solving "the last mile" while is adding Brew to PATH.

I was quite disappointed after installing the PKG that opening a new terminal and typing "which brew" resulted in an unknown command.

What alternatives to the feature have been considered?

The alternative for new users (and veterans like myself that don't upgrade their macs all that often) is to once again research how to add something to your PATH (and then decide whether to use .bashrc, or .zprofile or .bash_profile and going down a deep rathole about which one is better etc.

Suddenly all productivity gains are lost...

The alternative of course is to use the old script install method, but then one wonders why you are pushing this new PKG install approach at all, if it ends up being more complex?

MikeMcQuaid commented 9 months ago

The alternative of course is to use the old script install method

The old script install method displays literally the identical instructions as the installer on how to add to the PATH. Homebrew (except e.g. installing casks) does not modify systemwide files outside its installation prefix and does not modify user files; this is how it and its installer have always worked and how I think they should consider to work, sorry.

The brew homepage seems to encourage using the new .pkg to install homebrew easily

This should be considered an alternate, supported installation model but not something that replaces the installation script. If you have a suggestion for how to reword the homepage to better indicate that: we'll consider it.

Sorry, passing on this for now.