Skip to content

[BUG] GitHub Actions FORCE_COLOR with console.status #3632

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

Open
ocervell opened this issue Feb 11, 2025 · 2 comments
Open

[BUG] GitHub Actions FORCE_COLOR with console.status #3632

ocervell opened this issue Feb 11, 2025 · 2 comments

Comments

@ocervell
Copy link

ocervell commented Feb 11, 2025

I used to have console defined like this:

console = Console(stderr=True, color_system='truecolor')

and things like:

with console.status('Installing tools ...'):
  # pass

would work properly on GitHub actions, i.e console.print would give me colored output and console.status messages would be hidden since I am on CI terminal.

After removing color_system='truecolor', I tried setting FORCE_COLOR = 1 env variable in GitHub actions, and mostly things would work smoothly except for the status messages which would print on everyline like:

⠦  Installing Go...
Resolving dl.google.com (dl.google.com)... 64.233.180.91, 64.233.180.190, 
64.233.180.93, ...
⠦  Installing Go...
⠦  Installing Go...
Connecting to dl.google.com (dl.google.com)|64.233.180.91|:443... connected.
⠦  Installing Go...
⠧  Installing Go...
HTTP request sent, awaiting response... 200 OK
⠇  Installing Go...
Length: 68988925 (66M) [application/x-gzip]
⠇  Installing Go...
Saving to: ‘go1.22.0.linux-amd64.tar.gz’
⠇  Installing Go...
     0K .......... .......... .......... .......... ..........  0% 4.65M 14s
⠇  Installing Go...
    50K .......... .......... .......... .......... ..........  0% 8.99M 11s
⠇  Installing Go...
   100K .......... .......... .......... .......... ..........  0% 10.8M 9s
⠇  Installing Go...
   150K .......... .......... .......... .......... ..........  0% 23.9M 8s
⠇  Installing Go...
   200K .......... .......... .......... .......... ..........  0% 26.3M 7s
⠇  Installing Go...
   250K .......... .......... .......... .......... ..........  0% 21.8M 6s
⠇  Installing Go...
   300K .......... .......... .......... .......... ..........  0% 29.5M 5s
⠇  Installing Go...
   350K .......... .......... .......... .......... ..........  0% 41.1M 5s
⠇  Installing Go...
   400K .......... .......... .......... .......... ..........  0% 46.1M 5s
⠇  Installing Go...
   450K .......... .......... .......... .......... ..........  0% 47.3M 4s
⠇  Installing Go...
   500K .......... .......... .......... .......... ..........  0% 36.1M 4s
⠇  Installing Go...
   550K .......... .......... .......... .......... ..........  0% 71.1M 4s
⠇  Installing Go...
   600K .......... .......... .......... .......... ..........  0% 74.1M 4s
⠇  Installing Go...
   650K .......... .......... .......... .......... ..........  1% 73.4M 3s
⠇  Installing Go...
   700K .......... .......... .......... .......... ..........  1% 61.2M 3s
⠇  Installing Go...
   750K .......... .......... .......... .......... ..........  1%  143M 3s
⠇  Installing Go...
   800K .......... .......... .......... .......... ..........  1% 55.8M 3s
⠇  Installing Go...
   850K .......... .......... .......... .......... ..........  1%  155M 3s
⠇  Installing Go...
   900K .......... .......... .......... .......... ..........  1% 71.4M 3s
⠇  Installing Go...
   950K .......... .......... .......... .......... ..........  1% 44.1M 3s

Any idea how I can fix this without explicitely having to set color_system ?

Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
@ocervell and others