From d08c0dbc47c7be7f8db9ebfbfc49b8e66d5b5d86 Mon Sep 17 00:00:00 2001 From: Will Bush Date: Sun, 21 Apr 2024 20:23:06 -0500 Subject: [PATCH] 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. --- .github/workflows/check-by-name.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/check-by-name.yml b/.github/workflows/check-by-name.yml index bdc223e3d32c..c69d0fb20a9c 100644 --- a/.github/workflows/check-by-name.yml +++ b/.github/workflows/check-by-name.yml @@ -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