From 97268e8e04492dfb9485bb322e15227cc8474f89 Mon Sep 17 00:00:00 2001 From: Aaron Paterson Date: Wed, 19 Apr 2023 01:37:11 -0600 Subject: [PATCH] use git diff --cached in diff check action ensures every build difference is in the diff --- .github/workflows/check-dist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 99c1f04..45cfdd3 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -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