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
Add a few environment variables important for editors #16064
Conversation
It wasn't closed by mistake, I don't see the value in increasing all of these variables for the benefits of a few editors. Which editor are you actually using and which variables do you personally rely on being present? These could be passed through as |
From #13843:
I use helix which, as I have written in the PR description, relies on that variable.
How it looks like with this PR: Helix does not rely on
Setting On "hard-to-debug" above: finding the
Due to less global behavior of |
Side question: why does |
|
Two is "a few" (hence my wording).
Which variable: I know you wrote it in the PR description but: it wasn't clear (hence why I asked again).
Let's let those folks open the relevant issues/PRs, please, and scope this one just down to the variable(s?) you personally need.
It does help but: I did not explain adequately, my apologies. Rather than changing: Lines 206 to 209 in 78e7401
Instead add to: Lines 152 to 161 in 78e7401
and then add a This scopes the variable to just this command rather than adding it everywhere, potentially breaking formulae installations.
This change dramatically reduces the number of issues with Homebrew running and installing packages based on user-set environment variables. As a result: we want to be extremely conservative here.
@apainintheneck I disagree. When it's only something needed for a specific command (or few commands): we should scope it to just that command. I would be unsurprised if passing through |
@MikeMcQuaid That makes sense. I didn't notice that code pattern until now. |
Sounds pretty reasonable, will do.
Yeah, I understand that; however, I'm convinced it should not affect editor experience in any way since |
Great, thanks 👍🏻
Sorry, to be clear: what I proposed with using
Not worth opening an issue. It may be the nicest UX but: we're not going to do that, sorry. It's possible to break Homebrew initialisation through random environment variables which would prevent you getting to |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Sorry for a delay, hope I did this right? Works right on my machine at least |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @thecaralice!
Have you followed the guidelines in our Contributing document?
Have you checked to ensure there aren't other open Pull Requests for the same change?
Do not filter
COLORTERM
#13843 was mistakenly closedrel: Linux: brew edit don't work with graphical editor #6958
Have you added an explanation of what your changes do and why you'd like us to include them?
Have you written new tests for your changes? Here's an example.
Other allowed variables are not covered by any tests, and I'm not good enough at writing anything in Ruby, let alone covering obscure code with tests.
Have you successfully run
brew style
with your changes locally?Have you successfully run
brew typecheck
with your changes locally?Have you successfully run
brew tests
with your changes locally?I'm not going to decipher what
Error: failed to install the 'bundler' gem.
means and why does it happen, I'm no Ruby developer, let me use the important variables please.COLORTERM
is provided by iTerm2, Alacritty, Konsole and others to indicate 24-bit color support, and some editors like Helix and Neovim rely on that to enable true color themesCOLORFGBG
is provided by rxvt-based terminal emulators and some others like iTerm2, and it is relied on by some editors like vim/MacVim and other utilities like broot (through a library)COMMAND_MODE
is used much less frequently, but according tocompat(5)
its absence might cause some software to misbehave; as it is almost useless and I myself don't have a use case for it, I'm okay with removing this one.