use git diff --cached in diff check action
ensures every build difference is in the diff
This commit is contained in:
parent
bbdc4b1cfa
commit
97268e8e04
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue