Open scampi opened 5 years ago
Will be removed in 2.0.
This was removed in 2.x in https://github.com/rust-lang/rustfmt/pull/4006, but needs to be re-decided in 1.x.
With github actions, even with --color=always
still the diff view is NOT colourful:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v2
- name: Test run bare cargo fmt
run: >
cargo fmt --all --manifest-path=rsmain/Cargo.toml
-- --check --color=always
With github actions, even with --color=always still the diff view is NOT colourful:
That's because Actions has issues reporting tty/color support which has impacted myriad tools (https://github.com/actions/runner/issues/241). Some tools have implemented GitHub Actions-specific workarounds for this (e.g. by checking for the presence of the Actions-set env var), but I don't think that really makes sense for us. We utilize the term
crate for detection and handling, so if that's something important to you then I'd suggest reaching out to them (https://github.com/Stebalien/term) to gauge their willingness/interest in supporting any such workaround for GHA.
Just a note. Cargo has CARGO_TERM_COLOR
env var that can be set to always
for colors on github ci. But cargo fmt is not using that.
Tracking issue for color