When running cargo kcov inside Gitlab CI, any failures are reported simply as
thread 'main' panicked at 'Could not open stderr!', ../src/libcore/option.rs:705
note: Run with `RUST_BACKTRACE=1` for a backtrace.
which is a bit unhelpful.
On closer examination, the issue is in errors.rs line 79 which does
let mut t = stderr().expect("Could not open stderr!");
which is actually term::stderr. If the terminal is not set up correctly, this returns None and panics.
Repro:
$ TERM=none cargo kcov --kcov xyz
thread 'main' panicked at 'Could not open stderr!', ../src/libcore/option.rs:705
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Please can cargo-kcov fall back to using stderr (without colouring) if stderr() fails?
Thanks.
Workaround: prefix the cargo command with TERM=ansi.
When running cargo kcov inside Gitlab CI, any failures are reported simply as
which is a bit unhelpful.
On closer examination, the issue is in errors.rs line 79 which does
which is actually
term::stderr
. If the terminal is not set up correctly, this returnsNone
and panics.Repro:
Please can cargo-kcov fall back to using stderr (without colouring) if stderr() fails?
Thanks.
Workaround: prefix the cargo command with
TERM=ansi
.