Skip to content

fix(cli): render dim labels with gray so colors show in GitHub Actions (#323)#631

Merged
Chemaclass merged 1 commit into
mainfrom
fix/323-color-output-in-ci
Apr 19, 2026
Merged

fix(cli): render dim labels with gray so colors show in GitHub Actions (#323)#631
Chemaclass merged 1 commit into
mainfrom
fix/323-color-output-in-ci

Conversation

@Chemaclass
Copy link
Copy Markdown
Member

@Chemaclass Chemaclass commented Apr 19, 2026

Summary

  • Swap _BASHUNIT_COLOR_FAINT from SGR 2 (faint) to SGR 90 (bright black / gray) so keywords like Expected, Tests: and Assertions: stay colored in GitHub Actions logs, which don't render the faint attribute.
  • Update the bashunit_execution_error_test.sh helper and the 27 acceptance snapshots that captured the previous \e[2m sequence.
  • Add a regression test pinning _BASHUNIT_COLOR_FAINT to the gray code.

Why

Per #323, Expected / to contain were colored locally on macOS/iTerm but invisible in GitHub Actions logs. The root cause is that the GitHub Actions web log renderer does not render SGR 2 (faint/dim). SGR 90 is supported everywhere and looks visually similar.

Test plan

BEFORE

Screenshot 2026-04-19 at 16 31 58

AFTER

Screenshot 2026-04-19 at 16 32 19

Closes #323

SGR 2 (faint/dim) is not rendered by the GitHub Actions log UI,
so keywords like `Expected`, `Tests:` and `Assertions:` appeared
without any color in CI while looking dim locally. Switch the
`_BASHUNIT_COLOR_FAINT` constant to SGR 90 (bright black / gray),
which is widely supported across terminals and CI renderers.

Closes #323
@Chemaclass Chemaclass merged commit d77cafe into main Apr 19, 2026
30 checks passed
@Chemaclass Chemaclass deleted the fix/323-color-output-in-ci branch April 19, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

syntax coloring difference / GithubActions vs. macos iTerm

1 participant