Add 'LANG' to the environment filter to ensure it passes into brew if/when set in the user's environment#21945
Open
jamesrtnz wants to merge 3 commits intoHomebrew:mainfrom
Open
Add 'LANG' to the environment filter to ensure it passes into brew if/when set in the user's environment#21945jamesrtnz wants to merge 3 commits intoHomebrew:mainfrom
jamesrtnz wants to merge 3 commits intoHomebrew:mainfrom
Conversation
MikeMcQuaid
reviewed
Apr 8, 2026
Member
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Thanks!
Let's use one of the other bin/brew paths here and pass it through as HOMEBREW_LANG where it can specifically be set in the glibc postinstall code rather than being applied universally in all Homebrew formulae, casks and core code where it is (much) more likely to break things.
Author
|
OK; if I understand the codebase, that will be an update to env_config.rb, and also an update to the glibc formula? |
Member
|
@jamesrtnz add to https://github.com/jamesrtnz/brew/blob/4ec9c96e2e97ed10684dc98d91e9f9ac71b73d1e/bin/brew#L215-L239 and then to formula |
Member
|
that will set |
…HOMEBREW_LANG from LANG in user's env
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per https://github.com/orgs/Homebrew/discussions/6785; currently, the end user's 'LANG' environment variable isn't included in the filter, so is dropped when 'brew' commands are run.
The knock-on impact of this is that the glibc 'postinstall' code which attempts to include the user's language support doesn't see any values for LANG, so they don't get included automatically.
This PR will resolve that; and will mean that future glibc updates (on Linux particularly) will include other languages besides en_US.UTF-8 if the end-user is using them.
brew lgtm(style, typechecking and tests) with your changes locally?