https://pantsbuild.org/ logo
f

fast-nail-55400

03/10/2022, 7:23 PM
In a
BuiltinGoal
, how do I access the environment?
os.environ
is empty except for
PANTS_BIN_NAME
. Do I need to make an
EnvironmentRequest
to the engine?
h

hundreds-father-404

03/10/2022, 7:33 PM
That's what I would expect to be the case
w

witty-crayon-22786

03/10/2022, 8:14 PM
it should be in the SessionValues as well.
f

fast-nail-55400

03/10/2022, 8:16 PM
yeah that’s what I ended up with via
CompleteEnvironment
w

witty-crayon-22786

03/10/2022, 8:17 PM
EnvironmentRequest
is recommended if you’re consuming it from a
@rule
, but outside the engine it’s fine to look at the whole thing.
f

fast-nail-55400

03/10/2022, 8:19 PM
yeah this is outside the engine. https://github.com/pantsbuild/pants/pull/14756