Git Product home page Git Product logo

Comments (4)

carlocab avatar carlocab commented on May 26, 2024 1

brew shellenv is designed to work for 95% of our users. In its current form, it does that.

I don't think there is a way to make the changes you propose without either a) breaking shellenv for a significant proportion of the 95%, or b) making the code significantly more complex than it's worth making shellenv more useful to another 2-3% of users.

For your use case, I suggest sticking with the code you've already written to add Homebrew to PATH, MANPATH, etc instead of using shellenv.

However, if in fact there is a simple way to update shellenv without breaking it for any existing users, please open a pull request instead.

from brew.

MikeMcQuaid avatar MikeMcQuaid commented on May 26, 2024

Delete PATH, MANPATH, and INFOPATH in the default shellenv.sh.

brew should only handle its own private variables, such as HOMEBREW_PREFIX,

This is not going to happen. It will break the setup for everyone who relies on this.

For example, avoid duplication or sequencing.

We intentionally are willing to accept duplication here (it does no harm) to ensure that the sequencing is correct (so that bin/brew and brew installed bins and sbins are at the front of the various *PATH.

from brew.

bnse avatar bnse commented on May 26, 2024

This is not going to happen. It will break the setup for everyone who relies on this.

I think good design should be able to separate private and public parts.

brew_env() {
  set_brew_private_env
  set_public_env
}

Equal:

set_brew_private_env && set_public_env

This makes it easier to combine other programs. And can be called multiple times safely.

set_brew_private_env && set_brew_public_env
set_brew_public_env && more_process_a
set_brew_private_env && more_process_b

We intentionally are willing to accept duplication here (it does no harm) to ensure that the sequencing is correct (so that bin/brew and brew installed bins and sbins are at the front of the various *PATH.

We got a clean path handling.

PATH = user_path:brew_path:sys_path

OR

clean_path_handle() {
  addToPath user_path
  addToPath brew_path
  addToPath sys_path
}

from brew.

MikeMcQuaid avatar MikeMcQuaid commented on May 26, 2024

I think good design should be able to separate private and public parts.

I think the design is good already. Regardless: we cannot make backwards incompatible changes, like you're proposing.

from brew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.