diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index f1636d8..fb93e92 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -38,7 +38,7 @@ 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 --ignore-space-at-eol --exit-code --quiet dist/; then echo "Detected uncommitted changes after build. See status below:" git diff exit 1 diff --git a/README.md b/README.md index 6133b8e..ca16718 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ steps: - name: Verify generated types match Postgres schema run: | supabase gen types typescript --local > schema.gen.ts - if [ "$(git diff --ignore-space-at-eol schema.gen.ts | wc -l)" -gt "0" ]; then + if ! git diff --ignore-space-at-eol --exit-code --quiet schema.gen.ts; then echo "Detected uncommitted changes after build. See status below:" git diff exit 1