adhoc_tool has an <extra_env_vars> field - but I c...
# general
n
adhoc_tool has an extra_env_vars field - but I can't see where any global variables would be set that it would add to - or that functionality doesn't exist?
b
I think there's not a
pants.toml
setting as you observe, but I think the runnable can implicitly set some of its own env vars, and so
extra_env_vars
is augmenting those. Breadcrumbs from my code-exploration: •
tool_runner.extra_env
is those from the runnable https://github.com/pantsbuild/pants/blob/d2a9a46e8caf2293759183d10488aa24d3be364a/src/python/pants/backend/adhoc/adhoc_tool.py#L93-L94 • using a
python_source
as a runnable is an example that sets env vars: https://github.com/pantsbuild/pants/blob/d2a9a46e8caf2293759183d10488aa24d3be364a/src/python/pants/backend/python/goals/run_helper.py#L118-L121
(it'd definitely seem to make sense to also have a global version though)
n
ah ok - thanks!