Skip to content
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

[unstable option] color #3385

Open
scampi opened this issue Feb 13, 2019 · 5 comments
Open

[unstable option] color #3385

scampi opened this issue Feb 13, 2019 · 5 comments
Labels
unstable option tracking issue of an unstable option

Comments

@scampi
Copy link
Contributor

scampi commented Feb 13, 2019

Tracking issue for color

@scampi scampi added the unstable option tracking issue of an unstable option label Feb 13, 2019
@topecongiro
Copy link
Contributor

Will be removed in 2.0.

@karyon
Copy link
Contributor

karyon commented Nov 14, 2021

This was removed in 2.x in #4006, but needs to be re-decided in 1.x.

@karyon karyon reopened this Nov 14, 2021
@lnshi
Copy link

lnshi commented Nov 26, 2021

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

@calebcartwright
Copy link
Member

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 (actions/runner#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.

@francisdb
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unstable option tracking issue of an unstable option
Projects
None yet
Development

No branches or pull requests

6 participants