Merge pull request #52103 from Calinou/ci-diffs-color-codes

Print colored diffs when there are formatting failures in CI
This commit is contained in:
Hugo Locurcio 2021-08-25 18:31:56 +02:00 committed by GitHub
commit 181d93ed94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -15,7 +15,7 @@ PY_FILES=$(find \( -path "./.git" \
\) -print)
black -l 120 $PY_FILES
git diff > patch.patch
git diff --color > patch.patch
# If no patch has been generated all is OK, clean up, and exit.
if [ ! -s patch.patch ] ; then

View file

@ -40,7 +40,7 @@ while IFS= read -rd '' f; do
done
done
git diff > patch.patch
git diff --color > patch.patch
# If no patch has been generated all is OK, clean up, and exit.
if [ ! -s patch.patch ] ; then

View file

@ -42,7 +42,7 @@ while IFS= read -rd '' f; do
perl -i -ple 's/\s*$//g' "$f"
done
git diff > patch.patch
git diff --color > patch.patch
# If no patch has been generated all is OK, clean up, and exit.
if [ ! -s patch.patch ] ; then