Can I programatically determine the output path of...
# general
a
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
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