Skip to content

Commit 8d24e19

Browse files
committed
Print useful info when git diff check fials
1 parent e44f4af commit 8d24e19

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/flambda-backend.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ jobs:
104104
export MERLIN_TEST_OCAML_PATH=$GITHUB_WORKSPACE/flambda-backend/_install
105105
opam exec -- dune build
106106
opam exec -- dune runtest -p merlin-lib,dot-merlin-reader,merlin,ocaml-index
107-
# Check if dune promoted any files. If this check fails, the likely culprit is
108-
# that you compiled with the wrong menhir version. Cross-check your opam switch's
109-
# menhir version with the one in merlin-lib.opam
110-
git diff --quiet
107+
if ! git diff --quiet ; then
108+
echo "The following files were modified by dune:" >&2
109+
git diff --name-only >&2
110+
echo "" >&2
111+
echo "Hint: If this check fails, the likely culprit is
112+
that you compiled with the wrong menhir version. Cross-check your opam switch's
113+
menhir version with the one in merlin-lib.opam" >&2
114+
exit 1
115+
fi

0 commit comments

Comments
 (0)