broad-processor-9240001/16/2023, 5:37 AM
./pants run ...
interact in inconsistent ways, is this intentional/expected? https://gist.github.com/huonw/3e6ebe4c9a4037a31655fce34eea357d 1.
(running a python source directly) sets the env vars from
./pants run ./main.py
./pants run //:pex
) does not set the env vars
fresh-cat-9082701/16/2023, 5:18 PM
is equivalent to producing a package package of the
target and then having it executed from the repository root. The
set "environment settings for forked subprocesses", so once the PEX binary is produced, it must be detaching from the initial process so the env vars you've set no longer apply. Please see https://www.pantsbuild.org/docs/python-run-goal#execution-semantics for more information. Do your workflows depend on the env vars propagated to the
targets, i.e. you cannot run the `python_source`s?
broad-processor-9240001/16/2023, 9:21 PM
, just they're also packaged into
for other reasons, so it'd be 'cute' if we could reuse them. Not a problem though. Thanks