Currently, there's no way to write program output to a file other than using shell redirection. In some cases, such as containerized CI jobs that may not have a shell, this leaves no way to write the output to file.
In my specific case, I'm using Earthly's Rust library which wraps Cargo for improved caching in CI. Unfortunately, there's no way to write the output of cargo-license to a file using their interface to cargo. I'd be able to do it with an option like this though!
Currently, there's no way to write program output to a file other than using shell redirection. In some cases, such as containerized CI jobs that may not have a shell, this leaves no way to write the output to file.
In my specific case, I'm using Earthly's Rust library which wraps Cargo for improved caching in CI. Unfortunately, there's no way to write the output of
cargo-license
to a file using their interface tocargo
. I'd be able to do it with an option like this though!