Is it possible to reference an environment variabl...
# general
r
Is it possible to reference an environment variable from a macro? I have a macro that generates a couple targets and I want to include a few additional (non-inferable) dependencies if a certain environment variable is present.
Also, is there a list of all the built-in functions you can reference from a
BUILD
file or macro somewhere?
c
Is it possible to reference an environment variable from a macro?
Yes with
env()
c
Also, is there a list of all the built-in functions you can reference from a
BUILD
file or macro somewhere?
yes, in https://github.com/pantsbuild/pants/pull/18378 is in 2.16.0a0 and 2.17.0.dev0 using
Copy code
pants symbols --help
c
oh, that help includes my macros. Nice!
😁 1