Diff command fails in GH actions but not in Travis

I am trying to migrate the CI process from Travis to GH Actions, but one thing keeps bothering me.

Here: https://github.com/WPTT/WPThemeReview/pull/261/checks?check_run_id=1542166027

The diff command I’m running is showing differences.

The analogue build here: https://travis-ci.com/github/WPTT/WPThemeReview/jobs/450067838

is not (and is passing).

I tried changing the OS from ubuntu-latest to ubuntu-16.04, thinking that maybe something changed in the diff command, but it too failed on GH Actions.

If anybody can help me understand why it fails I’d be grateful.

diff returns 1 if the checked files are different, and has been for a long time. So I think the thing to look at is why the files are different in the Actions build. At a glance the differences seem to be in indentation, maybe the defaults for xmllint are different?


That was the issue. Thanks! I added export XMLLINT_INDENT=$'\t' before the diff run and it worked :slight_smile:

1 Like