Skip to content

Commit

Permalink
ci(prettier): show diff if prettier made changes
Browse files Browse the repository at this point in the history
The normal output is not helpful, see also: prettier/prettier#6885
  • Loading branch information
Finkregh committed Aug 15, 2024
1 parent da8c1fb commit 0681b34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ jobs:
key: prettier-main-cache

- name: Lint
run: pnpm prettier --cache-location .cache/prettier
run: |
pnpm prettier --write --cache-location .cache/prettier || {
echo "[ERROR] Please apply the changes prettier suggests:"
git diff --color=always; exit 1;
}
- name: Remove cache
if: github.event_name == 'push'
Expand Down

0 comments on commit 0681b34

Please sign in to comment.