abundant-leather-17386
08/24/2022, 12:30 PMextra_env_vars
in the python_tests
target. I would like to put an absolute path to a directory inside the chroot in an environment variable. Does anyone have an idea how I can achieve this?enough-analyst-54434
08/24/2022, 12:32 PMX=Y
in the BUILD or can you just write X
and have something higher level outside pants set X=Y
in the env you run Pants in?enough-analyst-54434
08/24/2022, 12:33 PMabundant-leather-17386
08/24/2022, 12:33 PMenough-analyst-54434
08/24/2022, 12:34 PMabundant-leather-17386
08/24/2022, 12:34 PMenough-analyst-54434
08/24/2022, 12:34 PMabundant-leather-17386
08/24/2022, 12:35 PMenough-analyst-54434
08/24/2022, 12:35 PMabundant-leather-17386
08/24/2022, 12:35 PMabundant-leather-17386
08/24/2022, 12:35 PMenough-analyst-54434
08/24/2022, 12:35 PMenough-analyst-54434
08/24/2022, 12:40 PMFOO=${CHROOT}/bar
- basically Pants allows you to refer to other environment variables and does the interpolation. The only env vars that are fair game would be the ones Pants exposes, so this would stay self contained. Today Pants does not expose CHROOT
, so that would need to be added. This is dangerous though, since that absolute path must not be used to produce a binary - for example, with the CHROOT baked in, but this could be buyer-beware.abundant-leather-17386
08/24/2022, 12:44 PMabundant-leather-17386
08/24/2022, 12:46 PMenough-analyst-54434
08/24/2022, 1:01 PMenough-analyst-54434
08/24/2022, 1:02 PMenough-analyst-54434
08/24/2022, 2:20 PMenough-analyst-54434
08/24/2022, 2:21 PMabundant-leather-17386
08/24/2022, 2:35 PM