You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem cargo test appears to be ignoring both CARGO_TERM_COLOR and the --color option and always autodetecting color support. This means that if you want to force color on or off, it doesn't respect either the env var or the flag.
Steps
cargo test --color never produces color in a terminal (bug)
CARGO_TERM_COLOR=never cargo test produces color in a terminal (bug)
Same occurrs with the inverse - try the commands in CI (like gitlab) and try forcing on color - it doesn't work.
Notes
Output of cargo version: cargo 1.46.0-nightly (c26576f9a 2020-06-23)
Note that this doesn't seem to apply to check, build, or doc - they all appear to work as intended. Note also that in the below screenshot (run with --color always in an environment that cargo detects as without color by default), the doc/build steps in cargo test have colored output, but the test status does not
The text was updated successfully, but these errors were encountered:
If this is in reference to the color of the tests themselves, then I think this is issue #1983. Libtest has its own set of flags that need to be passed separately.
Problem
cargo test
appears to be ignoring bothCARGO_TERM_COLOR
and the--color
option and always autodetecting color support. This means that if you want to force color on or off, it doesn't respect either the env var or the flag.Steps
cargo test --color never
produces color in a terminal (bug)CARGO_TERM_COLOR=never cargo test
produces color in a terminal (bug)Notes
Output of
cargo version
:cargo 1.46.0-nightly (c26576f9a 2020-06-23)
Note that this doesn't seem to apply to
check
,build
, ordoc
- they all appear to work as intended. Note also that in the below screenshot (run with --color always in an environment that cargo detects as without color by default), the doc/build steps incargo test
have colored output, but the test status does notThe text was updated successfully, but these errors were encountered: