Disabling colored output requires convoluted `cargo test --color=never -- --color=never` incantation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
EDIT: see durka's comment below
It seems that there is no way to disable the colored output of cargo test. This is a nice thing to have when displaying output on e.g. CI sites that do not support ASCII escape codes.
Combinations I tried blindly that didn't work include:
cargo test --no-colorcargo test -- --no-colorcargo test --colorcargo test -- --colorcargo test --color never
Also checked output of cargo -h and cargo test -h but saw nothing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the cargo test command and its handling of arguments, then inspect how color settings are passed to the test runner. Reproduce the current cargo test --color=never -- --color=never behavior and identify the intended single-option interface. Done means cargo test can disable colored output without the repeated flag and the behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100