'Gitlab & Dyff - How do I get the dyff compare tool to output colors and side by side information in a gitlab pipeline?

I have a gitlab pipeline which compares 2 yaml files using dyff. I chose dyff because of the ease and formatting of yaml compares. It works great on the command line, but not when I run the command inside a pipeline. The dyff output of the compare is not side by side, which is the most important, but colors showing up would be great too. I've tried setting output to UTF-8 but that didn't work. I'm not ready to bail on dyff yet and really hope I can get that to work, however, I'd be interested to hear of similar solutions that work inside a gitlab pipeline. Thanks



Solution 1:[1]

In dyff, there is a command line flag to overwrite the terminal width detection and I suspect what happens here is that in the CI system the termin width detection does not work and therefore defaults to something like a width of 128. You could try to overwrite it with a larger value.

dyff --fixed-width=512 ...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matthias Diester