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

Setting FORCE_COLOR=true does not seem to work (in GH actions at least) #10303

Closed
scop opened this issue Jan 5, 2025 · 4 comments · Fixed by #10315
Closed

Setting FORCE_COLOR=true does not seem to work (in GH actions at least) #10303

scop opened this issue Jan 5, 2025 · 4 comments · Fixed by #10315
Assignees
Labels
bug Something isn't working cli Related to the command line interface good first issue Good for newcomers help wanted Contribution especially encouraged

Comments

@scop
Copy link

scop commented Jan 5, 2025

Setting FORCE_COLOR=true does not seem to give colorized output in GitHub actions.

Reproducer pipeline job at https://github.com/scop/pytekukko/actions/runs/12620953794/job/35167229162 (the "Install Python dev dependencies" step)

  • Shows that FORCE_COLOR is set to true in the env, and there's no NO_COLOR or CLICOLOR_FORCE env vars present
  • Shows that there's no --color arg passed to uv

...but the uv output has no color. I tried explicit export of FORCE_COLOR too, to no avail.

Another job at https://github.com/scop/pytekukko/actions/runs/12620965743/job/35167258389 that passes --color always does result in color output (again, see the "Install Python dev dependencies" step).

This workflow uses the current astral-sh/setup-uv action, so uv is current, too.

scop added a commit to scop/pytekukko that referenced this issue Jan 5, 2025
uv's output does not colorize with this for some reason at the moment
though, astral-sh/uv#10303
@samypr100
Copy link
Collaborator

Can you give CLICOLOR_FORCE="true" instead a quick try?

@samypr100 samypr100 added the bug Something isn't working label Jan 5, 2025
@samypr100
Copy link
Collaborator

Here's an isolated MRE

Works

docker run --platform linux/x86_64 -e CLICOLOR_FORCE=1 --rm ghcr.io/astral-sh/uv:python3.12-alpine /bin/sh -c "uv init test"

Does not work

docker run --platform linux/x86_64 -e FORCE_COLOR=1 --rm ghcr.io/astral-sh/uv:python3.12-alpine /bin/sh -c "uv init test"

Seems like this stopped working after 0.5.0, possibly related to #8215

Works

docker run --platform linux/x86_64 -e FORCE_COLOR=1 --rm ghcr.io/astral-sh/uv:0.4.30-python3.12-alpine /bin/sh -c "uv init test"
docker run --platform linux/x86_64 -e CLICOLOR_FORCE=1 --rm ghcr.io/astral-sh/uv:0.4.30-python3.12-alpine /bin/sh -c "uv init test"
docker run --platform linux/x86_64 -e CLICOLOR_FORCE=1 --rm ghcr.io/astral-sh/uv:0.5.0-python3.12-alpine /bin/sh -c "uv init test"

Does not work

docker run --platform linux/x86_64 -e FORCE_COLOR=1 --rm ghcr.io/astral-sh/uv:0.5.0-python3.12-alpine /bin/sh -c "uv init test"

@samypr100 samypr100 added the cli Related to the command line interface label Jan 5, 2025
@charliermarsh
Copy link
Member

Thanks @samypr100!

@charliermarsh charliermarsh added good first issue Good for newcomers help wanted Contribution especially encouraged labels Jan 5, 2025
@charliermarsh charliermarsh self-assigned this Jan 6, 2025
@charliermarsh
Copy link
Member

Fixed in #10315.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the command line interface good first issue Good for newcomers help wanted Contribution especially encouraged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants