workflows: force CLI color when running nixpkgs-check-by-name

Currently something about the environment in which GH action is running the
colored library is not using ANSI colors.

I have done some testing in this repo:

https://github.com/willbush/throwaway-miette-gh-action-test/actions/runs/8777029939/job/24081383467

And I'm fairly certain env var `CLICOLOR_FORCE: 1` should fix colors.
This commit is contained in:
Will Bush 2024-04-21 20:23:06 -05:00
parent f672451260
commit d08c0dbc47
No known key found for this signature in database
GPG Key ID: 3823864B54B13BDA
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ jobs:
# Adds a result symlink as a GC root
nix-store --realise "$toolPath" --add-root result
- name: Running nixpkgs-check-by-name
env:
# Force terminal colors to be enabled. The library that
# nixpkgs-check-by-name uses respects: https://bixense.com/clicolors/
CLICOLOR_FORCE: 1
run: |
if result/bin/nixpkgs-check-by-name --base "$base" .; then
exit 0