-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Preserve PEX_ env variables after calling pex #180
Labels
Comments
If you haven't kibbutzed with @baroquebobcat you might want to. |
This is actually a bug. The |
jsirois
added a commit
to jsirois/pex
that referenced
this issue
Mar 24, 2020
Previously, `PEX_*` environment variable stripping incorrectly stripped `PEX_*` environment variables in host process when the `PEX.run` API was used. This is fixed and an option to not strip pex environment variables at all is added to `PexInfo` / the Pex CLI. This new option is used to publish a Pex PEX that supports control via environment variables. Fixes pex-tool#180 Fixes pex-tool#925 Work towards pex-tool#926
jsirois
added a commit
that referenced
this issue
Mar 24, 2020
* Fix `PEX_*` env stripping and allow turning off. Previously, `PEX_*` environment variable stripping incorrectly stripped `PEX_*` environment variables in host process when the `PEX.run` API was used. This is fixed and an option to not strip pex environment variables at all is added to `PexInfo` / the Pex CLI. This new option is used to publish a Pex PEX that supports control via environment variables. Fixes #180 Fixes #925 Work towards #926 * Fix Python versionisms. * Explain --no-strip-pex-env more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/pantsbuild/pex/blob/master/pex/pex.py#L48
Currently we delete all env variables from os.environ that start with PEX_. If pex is called from another process as a library this will override the parent scripts env variables. If the env variables are reset back to their original state at the end of execution the behavior would be less confusing when using pex as a library.
For example in pants if we try to override the PEX_ROOT every time we call pex to build a target PEX_ROOT is reset.
The text was updated successfully, but these errors were encountered: