-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
This is a spinoff of #13056
I have to add FORCE_COLOR=1 to my Makefile to force color output on CircleCI and GitHub Actions.
Here is an example of a build with the default options and no color output: https://github.com/Quansight-Labs/ndindex/actions/runs/11253438088/job/31288699625
Here is an example where I've set FORCE_COLOR=1 (from a different project): https://github.com/sympy/sympy/actions/runs/11484600101/job/31963800399
The color output makes things much easier to read, especially if there is a warning or error printed in red.
How to Reproduce
Run a Sphinx build on GitHub Actions
Environment Information
See the build log above. Seems to be installing Sphinx 8.0.2
Sphinx extensions
No response
Additional context
We should investigate why this happens. It isn't clear to me if this is just a limitation of CI systems or if there is something else at play here. What do other tools that output color on CI do? Are they manually enabling color when they detect they are on GitHub Actions? Is the fact that Sphinx is run through make
relevant?
Obviously we don't want to unconditionally enable color output in Sphinx, especially when the output is a pipe.