Skip to content

Predefine CLICOLOR_FORCE=1 for GitLab Runners

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

Most programs run in GitLab CI don't output ANSI color codes, because they don't detect a tty (or something even more sophisticated like terminfo). But GitLab CI would support them, so one has to manually add flags to his calls, e.g. --color=always.

Intended users

CI users that use tools which output colors.

Further details

Especially compiler errors are a lot more readable with colors.

Proposal

Add CLICOLOR_FORCE to the predefined environment variables and set it to 1.

Permissions and Security

Not sure what to put here.

Documentation

Would need to be documented here: https://docs.gitlab.com/ee/ci/variables/predefined_variables.html

Testing

Parsing ANSI colors is already supported and tested. What should change is that tools like CMake using make will now output colors without any manual adjustment.

What does success look like, and how can we measure that?

Also not sure what to put here, sorry.

Links / references

https://bixense.com/clicolors

Edited by 🤖 GitLab Bot 🤖