git add -N and no --cached

This commit is contained in:
Aaron Paterson 2023-04-19 10:08:25 -06:00 committed by GitHub
parent 97268e8e04
commit 3c3cfe66ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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