-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Expand env vars passed to --env
during run
#1415
Comments
Support variable references in environemtn variables that are set via --env, for example --env=PYTHONPATH=$XDG_DATA_HOME/python. Only a fixed set of environment variables are currently expanded: XDG_DATA_HOME XDG_CONFIG_HOME XDG_CACHE_HOME PATH HOME The expansion happens during sandbox setup, ie. when flatpak run is called. flatpak override will save the variable references unexpanded. Closes: flatpak#1415
Support variable references in environemtn variables that are set via --env, for example --env=PYTHONPATH=$XDG_DATA_HOME/python. Only a fixed set of environment variables are currently expanded: FLATPAK_ID HOME LD_LIBRARY_PATH PATH XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME The expansion happens during sandbox setup, ie. when flatpak run is called. flatpak override will save the variable references unexpanded. Closes: flatpak#1415
Support variable references in environemtn variables that are set via --env, for example --env=PYTHONPATH=$XDG_DATA_HOME/python. Only a fixed set of environment variables are currently expanded: FLATPAK_ID HOME LD_LIBRARY_PATH PATH XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME The expansion happens during sandbox setup, ie. when flatpak run is called. flatpak override will save the variable references unexpanded. Closes: flatpak#1415
Hi, is this still being considered to be eventually implemented? The linked PR #2555 was closed almost 4 years ago without a very clear explanation why it was not merged. Making sure an env var is being expanded to a path relative to Being able to just pass |
Creating a wrapper script for something like this is a very common pattern:
"export ATOM_HOME=\"$XDG_DATA_HOME\""
which can work acceptably for a single application but it becomes more of a problem setting something like:"export PYTHONUSERBASE=\"$XDG_DATA_HOME/python\""
which has to always be applied.Ideally one could just set
--env=PYTHONUSERBASE=$XDG_DATA_HOME/python
so we can assure it is always correctly set for all commands. It would surely need to be limited to the few thatflatpak
sets itself but that would be fine.The text was updated successfully, but these errors were encountered: