Skip to content

Commit 228312a

Browse files
committed
Have git diff produce colored output in CI
1 parent 7dbc5e9 commit 228312a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
local diff
3131
git checkout -- .
3232
"$@" >/dev/null || true
33-
if ! diff="$(git diff --exit-code)"; then
33+
if ! diff="$(git diff -U1 --color --exit-code)"; then
3434
printf '\n\e[31mError: running `\e[31;1m%s\e[31;22m` results in modifications that you must check into version control:\e[0m\n%s\n' "$*" "$diff" >&2
3535
return 1
3636
fi

0 commit comments

Comments
 (0)