Is there a proper/sanctioned/standard way of makin...
# plugins
g
Is there a proper/sanctioned/standard way of making pants "pipeable"? I'm pushing some containers (with my own OCI builder) but right now the info about pushing (hashes etc) is going to stderr . I'd want that either on stdout or writing to a file; but not sure if there's any prior art to mimic here. Optimally I'd want all builds from the current invocation in one place.
b
If you’re happy adjusting the shell side, you can include stderr in the stdout pipeable output via
pants whatever … 2>&1
which redirects file descriptor 2 (stderr) to file descriptor 1 (stdout). Similarly, stderr can be written to a file via
2> path/to/file.log
. Does either of those handle what you want? If you’re in a plug-in, another option would be having an output file containing the metadata. If you are in a plug-in, what goal is it running under?
g
It's running under publish, it felt like the most reasonable native goal. I was thinking a file, but I don't think I have a nice method of "collecting" the outputs from all publishes in a step?
Huh, I probably want
--publish-output=artifacts.json
, don't I. Now I feel like a doofus.
😅 1