Skip to content

ci(github): strip ANSI colour codes from the environment diff comment#10

Merged
jcardozo-eth merged 1 commit into
mainfrom
ci/strip-ansi-from-environment-diff-comment
Jul 15, 2026
Merged

ci(github): strip ANSI colour codes from the environment diff comment#10
jcardozo-eth merged 1 commit into
mainfrom
ci/strip-ansi-from-environment-diff-comment

Conversation

@jcardozo-eth

@jcardozo-eth jcardozo-eth commented Jul 15, 2026

Copy link
Copy Markdown
Member

Follow-up to #9, found while verifying on PR #5.

nix store diff-closures colours the size delta even when stdout is not a TTY, so the colour escape codes leaked into the comment and rendered as raw control codes (e.g. ^[[31;1m93.9 KiB^[[0m). Strip them with sed before the diff reaches the comment body.

Checklist

  • just check green

nix store diff-closures colours the size delta even when stdout is not a
TTY, so the colour escape codes leaked into the PR comment and rendered
as raw control codes (e.g. ^[[31;1m93.9 KiB^[[0m). Pipe the diff through
sed to strip the SGR codes before it reaches the comment body.
@jcardozo-eth
jcardozo-eth force-pushed the ci/strip-ansi-from-environment-diff-comment branch from 076ff37 to bb77c56 Compare July 15, 2026 17:34
@jcardozo-eth
jcardozo-eth merged commit b7bf269 into main Jul 15, 2026
4 checks passed
@jcardozo-eth
jcardozo-eth deleted the ci/strip-ansi-from-environment-diff-comment branch July 15, 2026 17:43
@jcardozo-eth jcardozo-eth added this to the 2.0.0 milestone Jul 24, 2026
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.

1 participant