https://pantsbuild.org/ logo
#general
Title
# general
l

loud-laptop-17949

03/02/2022, 11:14 PM
AFAICT, pex_binaries take env variables from the surrounding env. Is there a way to set extra env vars in a BUILD file?
h

happy-kitchen-89482

03/02/2022, 11:17 PM
To bake them into the .pex file itself to be set at pex runtime? Or to be set at build time?
l

loud-laptop-17949

03/02/2022, 11:21 PM
pex runtime
the situation I am in is not ideal, but basically I would like some vars to be set when I
./pants run
global across the repo would actually be ok too
h

happy-kitchen-89482

03/02/2022, 11:24 PM
Ah, so set on
./pants run
but not when you
./pants package
and then later run the .pex file without Pants?
l

loud-laptop-17949

03/02/2022, 11:25 PM
yeah
the more I talk about this the more this seems like a bad idea 🙂
h

happy-kitchen-89482

03/02/2022, 11:26 PM
Are the values of these vars secrets?
l

loud-laptop-17949

03/02/2022, 11:27 PM
no
they are basically pointers to config files
h

happy-kitchen-89482

03/02/2022, 11:32 PM
Could you set them in your
./pants
script?
As a workaround, anyway
l

loud-laptop-17949

03/03/2022, 1:12 AM
yeah I guess so
e

eager-dress-66405

03/03/2022, 6:16 AM
5 Views