Is it possible to use an environment variable in `...
# general
r
Is it possible to use an environment variable in
pants.toml
with a default value? The reason I am asking is because I want to add to
[cli.alias]
a command that with parameters that looks like
--profile-name %(env.PROFILE)s
. This environment variable is only needed in a few specific cases, but this requires
PROFILE
to be defined for
pants
to run at all. Is it possible to set a default value for environment variables like this without requiring a developer to define all of them in their environment?
1
h
I don't believe this is possible.
c
It is. Define them in .pants.bootstrap using bash syntax
The sourcing is done by scie-pants, so this is still supported.
h
I stand corrected!
f
thanks, Andreas! I've extended the docs https://github.com/pantsbuild/pants/pull/20538
🙌 1