brash-glass-61350
12/06/2023, 4:54 PMpants run, I want do add flag: --filter-address-regex='.*@resolve=XXX'. I imagine there's some way to do this in pants.toml? In particular, can XXX be an environment variable?
Essentially, I want to specify that when I call pants run path/to/my:file it should call pants run path/to/my:file@resolve=XXX , were XXX is set according to some environment variable (or some other mechanism)curved-television-6568
12/06/2023, 5:00 PM[cli.alias]
resolve-filter = "--filter-address-regex='.*@resolve=%(env.XXX)s'"
and then the invocation could include that:
pants run resolve-filter path/to/some:file
if you want the filter to always be set, you could set that in the config too:
[filter]
address_regex = ["..."]curved-television-6568
12/06/2023, 5:02 PM[cli-alias]
--resolve-filter = ...brash-glass-61350
12/06/2023, 5:21 PMbrash-glass-61350
12/06/2023, 5:22 PMbrash-glass-61350
12/06/2023, 5:22 PMcurved-television-6568
12/06/2023, 5:29 PMpants.toml file.. but you could have a .pants.bootstrap file, which is basically a shell script, and it could do:
: ${VAR_NAME:=default}
export VAR_NAME
that way you’re guaranteed to always have a value for it…brash-glass-61350
12/13/2023, 8:31 PMboundless-monitor-67068
01/05/2024, 12:12 PM