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
profile: Don't rely on bash syntax #2597
Conversation
|
In Debian, we reuse flatpak.sh in /etc/X11/Xsession.d (which is sourced by /bin/sh, normally dash) so that these environment variables become part of the X11 session environment. We might also have non-bash-compatible shells that read profile.d (I'm not sure). Fixes flatpak#2594 Signed-off-by: Simon McVittie <smcv@debian.org>
This does look like process substitution, still. So, does dash this support or not? Gotta love using a different shell just because |
Yes, I can confirm this works with dash and allows gdm to start |
📌 Commit 7189142 has been approved by |
☀️ Test successful - status-papr |
It sounds like bash does not support this either in this context:
|
No need to spawn a new shell with http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_01 |
BTW why was the initial code ever merged in the first place, as it was reviewed as being faulty at the time: #2122 (comment) |
It was merged because it worked for bash, and at the time nobody had a better solution. Merging it was successful in getting us one. |
So the strategy is to break things so that someone else will come by to fix them? |
That's the impression I'm getting as well. If you write code that requires bash, make bash a requirement and add a proper shebang to actually invoke bash instead of pretending /bin/sh will work and shrugging when it doesn't work for huge numbers of users. |
That can't work here. Code that gets sourced by an existing shell, rather than run (in |
In Debian, we reuse flatpak.sh in /etc/X11/Xsession.d (which is sourced
by /bin/sh, normally dash) so that these environment variables become
part of the X11 session environment. We might also have
non-bash-compatible shells that read profile.d (I'm not sure).