Open kriswuollett opened 1 year ago
Currently, ctx.actions.run
as far as I can tell cannot redirect output without using bash
(or cmd.exe
on Windows), and using bash
would defeat the point of run_binary
- you may as well use genrule
:)
So while this feature may be desirable, it first needs Bazel support to be added.
Thanks for the quick response, I was able to then search the Bazel repo and found the request for it in bazelbuild/bazel#5511.
The
run_binary
rule assumes that the output to be captured is written to file(s) by the binary either in implied or throughargs
location(s). This does not completely replace the usage ofgenrule
because the use case of capturing output from astdout
-only binary is not supported. Is it possible to capture output in Bazel, or does this use case still have to be done throughgenrule
?