-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
cmd/shellenv: set XDG_DATA_DIRS
on Linux
#18326
Conversation
a400f44
to
3d2b78a
Compare
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.
Seems reasonable to me, though I don't know how to review the PowerShell code.
Also wondering if we should just set this unconditionally on Linux.
70e6db9
to
367558b
Compare
I think that should be fine. Although we should consider the following from the XDG Base Directory Specification.
Therefore we might want to do something like this: export XDG_DATA_DIRS="${HOMEBREW_PREFIX}/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" |
Yes, we should follow that if we set it, but that doesn't seem to be much simpler than what we're already doing now. Fine with leaving it as is if it's enough to silence the warning from |
Some programs like `vapigen` might not work correctly, when `XDG_DATA_DIRS` does not include `$HOMEBREW_PREFIX/share`. Instead of requiring the user to manually adjust the shell environment, we can set `XDG_DATA_DIRS` as part of `cmd/shellenv`, so that it is sufficient to run `brew shellenv` on any particular system. Fixes #18317
367558b
to
12982a2
Compare
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!
Thanks again @notfirefox! |
Some programs like
vapigen
might not work correctly, whenXDG_DATA_DIRS
does not include$HOMEBREW_PREFIX/share
. Instead of requiring the user to manually adjust the shell environment, we can setXDG_DATA_DIRS
as part ofcmd/shellenv
, so that it is sufficient to runbrew shellenv
on any particular system.brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Fixes #18317