-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
shellenv: Homebrew-ize XDG_DATA_DIRS if set #17932
Conversation
`XDG_DATA_DIRS` is already set at the system level on many Linux distros, which negates the `glib` patch that quietly adds Homebrew's `share` dir to that search path. It's therefore necessary for `brew shellenv` to prepend to `XDG_DATA_DIRS` if it's set. Closes Homebrew/homebrew-core#179217.
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.
Makes sense, thanks again @gromgit!
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.
I note that check_xdg_data_dirs
in diagnostic.rb
seems to be checking this case. This seems like the appropriate place to warn about this rather than in brew shellenv
.
It's unclear to me whether this check is incorrect or the information was omitted from the user's brew doctor
output.
Let's change that instead of brew shellenv
.
I actually see a case for doing both, as a kind of "layered defence":
|
Passing on this in favour of #17947, thanks for both @gromgit!
As mentioned above: I specifically do not want:
Thanks again for the PR, hopefully this explains my reasoning better. |
XDG_DATA_DIRS
is already set at the system level on many Linux distros, which negates theglib
patch that quietly adds Homebrew'sshare
dir to that search path. It's therefore necessary forbrew shellenv
to prepend toXDG_DATA_DIRS
if it's set.Closes Homebrew/homebrew-core#179217.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?