use git diff --cached in diff check action

ensures every build difference is in the diff
This commit is contained in:
Aaron Paterson 2023-04-19 01:37:11 -06:00 committed by GitHub
parent bbdc4b1cfa
commit 97268e8e04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,9 +38,9 @@ jobs:
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
if [ "$(git diff --cached --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
git diff --cached --ignore-space-at-eol dist/
exit 1
fi
id: diff