so-fancy / diff-so-fancy

Good-lookin' diffs. Actually… nah… The best-lookin' diffs. :tada:
MIT License
17.36k stars 335 forks source link

no background color when play in gitlab ci #462

Closed sherlant closed 1 year ago

sherlant commented 1 year ago

Hello, I play with diff-so-fancy in gitlab ci. I take a diff between two dirs with the following command :

git diff /dir1 /dir2 | diff-so-fancy

This works, but i don't have background colors in result of my job. Foreground colors work perfectly. I have try to do the same command directly in container provisioned by ci, and background colors work.

Any idea ?

Thx

scottchiefbaker commented 1 year ago

Can you post a raw version of that diff (colors included) so we can investigate?

FWIW The target for d-s-f is probably not git diff on two directories... but if it's something simple I'll tackle it.

sherlant commented 1 year ago

Yes, i can show you. This is a diff in local : image

And the same diff in gitlab-ci : image

OJFord commented 1 year ago

This is not a dsf bug, you'd see the same on your own machine depending on terminal emulator functionality & settings; GitLab simply isn't rendering the background colour, and from my own use I don't think it out supports non-ASCII characters (can't think that I've ever seen one) such as the full-width dash used here: https://en.wikipedia.org/wiki/Box_Drawing