quaint-telephone-89068
02/14/2023, 8:41 PMpackage but not run goal (yet). I have defined a local_environment with subprocess_environment_env_vars. Now, when I run a python file, e.g. ./pants run src/main.py I can see that those environment variables are present in this sandbox.
Pants version
2.15.0rc4
OS
Linux (WSL2)
Additional info
It should be noted that I was expecting and hoping this to happen as I have a specific use case. I would like a set of envs to be present in both run and test, but specific envs to be different during each goal. I have a macro where I just merge those lists of envs and call one macro function in the local environment with subprocess_environment_env_vars=env_vars_run_django() and the other in the python tests target with extra_env_vars=env_vars_test_django().
I came accross this as I noticed that running a pex_binary target does not propagate the envs.
pantsbuild/pants