https://pantsbuild.org/ logo
#general
Title
# general
a

average-breakfast-91545

03/06/2023, 10:50 AM
Can I programatically determine the output path of a target? I can read
pants peek
, but the output path is
null
if not set. I could capture stderr and parse the log message but that seems fragile.
e

enough-analyst-54434

03/06/2023, 11:52 AM
You can. As you say, there is output path for when that is set. When it's not set, you'll notice a pattern if you just experiment running
pants package ::
on a collection of targets. In other words the fallback when output path is not set is algorithmic. There is no formal contract, but if we go breaking that, hopefully we're good enough to wait for a semver major bump or else make a big deal announcing the impending break.
👍 1
3 Views