taiki-e / cargo-llvm-cov

Cargo subcommand to easily use LLVM source-based code coverage (-C instrument-coverage).
Apache License 2.0
933 stars 57 forks source link

`cargo llvm-cov run` redirects stdout to stderr unconditionally #205

Closed gifnksm closed 2 years ago

gifnksm commented 2 years ago

When running the command with cargo llvm-cov run, the standard output of the command is redirected to the standard error output, so the integration test that checks the standard output of the command will not work.

https://github.com/taiki-e/cargo-llvm-cov/blob/f7870c5df548613f62de4aa472db552a669ed09b/src/main.rs#L405-L418

Is it possible to stop redirecting the standard output when the -q option is given?

taiki-e commented 2 years ago

Thanks for the report! This is because reports are output to stdout by default, but we should stop redirecting when one of --no-report, --output-path, --output-dir is passed.

taiki-e commented 2 years ago

The fix has been published in 0.5.0