-
Notifications
You must be signed in to change notification settings - Fork 88
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
Bash does not inherit PATH from parent process (T10037) #112
Comments
Fabio (#livingsilver94), 2021-11-25 11:00:19 UTC Fedora also retains |
Reilly Brogan (#ReillyBrogan), 2022-02-22 06:37:26 UTC I think this is a #DataDrake issue, because the last time I saw discussion about how profile.d should work (back when we had the GVFS/Hexchat issue) she had strong opinions on the topic. I'm unsure if the solution is to modify the |
Beatrice T. Meyers (#DataDrake), 2022-03-13 00:23:40 UTC #ReillyBrogan I'd need to see a little more testing related to this. What does In general, I agree that subshells should inherit an existing |
@ReillyBrogan was there any path forward on this? |
The fix had to be reverted: 6257780 PATH was seemingly never being set. |
I have put up #3096 for testing and for inspiration. It's possible that the sane thing to do here is to set the very basic paths up in a systemd environment file, and then do logic for each officially supported* shell that takes into account existing PATH contents when updating the PATH (which is what the PR above does for bash). *: I don't think we actually have any policy on which shells we officially support? |
I'm not sure if this counts as a bug, but it was for sure an unexpected behaviour.
Due to the configuration in the default bashrc, currently the
PATH
is reset every timebash
starts.For example if I do
PATH will not contain
/stuff
anymore.This is caused by the file in
/usr/share/defaults/etc/profile.d/10-path.sh
, which is sourced at the start of bashrc.As far as I could tell this behaviour has been like this since the first commits in
bash
andbaselayout
(where I believe the default bashrc resides), so I can't find a real motivation for why Solus does this.I would expect the
PATH
variable to behave like the rest of the environment and propagate to the child processes.I'm not sure how other distros do it (I verified it works in Ubuntu and Manjaro), possibly they reset the
PATH
only on login shellsThe text was updated successfully, but these errors were encountered: