-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--color=always
doesn't flow through to diffs
#367
Comments
Very surprised about this. Both insta (which renders the diff) and cargo-insta use |
Actually this part by cargo test runner is also not colored.
But by |
If an example is helpful:
|
I still don't have a great mental model of this — but at least some of the reason is that
...hence the The good news is that the outputs might become consolidated under cargo (rust-lang/cargo#1983 (comment)), which might solve then solve this, or at least make it more tractable |
Two parts to mitsuhiko#367 : - The libtest output, which this PR solves - I've hand-tested it - Possibly this becomes moot if `cargo` is changed to handle more of the output - The `insta` output when insta is called by libtest; e.g. the diffs. There's not much we can do here, but [`CLICOLOR_FORCE`](http://bixense.com/clicolors/) works
* Pass `--color=...` to libtest Two parts to #367 : - The libtest output, which this PR solves - I've hand-tested it - Possibly this becomes moot if `cargo` is changed to handle more of the output - The `insta` output when insta is called by libtest; e.g. the diffs. There's not much we can do here, but [`CLICOLOR_FORCE`](http://bixense.com/clicolors/) works * Update cargo-insta/src/cli.rs
Closed by #375 (I think). Passing |
What happened?
Currently
--color=always
doesn't affect the colorization of diffsReproduction steps
Take a failing test:
gives color in the diffs:
But when piped to a file, it only has color in the cargo parts, not the diffs:
This also occurs for
CARGO_TERM_COLOR
Insta Version
cargo-insta 1.29.0
rustc Version
1.65
What did you expect?
As above
The text was updated successfully, but these errors were encountered: