Can I expect the syntax `extra_build_args=['FURY_A...
# general
s
Can I expect the syntax
extra_build_args=['FURY_AUTH=%(env.FURY_AUTH)s']
to work in a
BUILD
file, I'm trying to create a Docker image target. I can do
Copy code
[docker]
build_args = ['FURY_AUTH=%(env.FURY_AUTH)s']
in
pants.toml
but I haven't had any luck figuring out the corresponding syntax in a
BUILD
file.
b
On new-enough versions (>= 2.16.0dev5), I think you can do something like
extra_build_args=[f"FURY_AUTH='{env('FURY_AUTH')}']
using the new
env()
build-file function. https://github.com/pantsbuild/pants/blob/main/docs/markdown/Using%20Pants/concepts/targets.md#environment-variables That's not too helpful for earlier versions, though
👍 1
s
Thanks! That's good to know
t
Is this example what you are looking for?
👍 1