Skip to content

Commit 0681b34

Browse files
authored
ci(prettier): show diff if prettier made changes
The normal output is not helpful, see also: prettier/prettier#6885
1 parent da8c1fb commit 0681b34

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/build.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,11 @@ jobs:
260260
key: prettier-main-cache
261261

262262
- name: Lint
263-
run: pnpm prettier --cache-location .cache/prettier
263+
run: |
264+
pnpm prettier --write --cache-location .cache/prettier || {
265+
echo "[ERROR] Please apply the changes prettier suggests:"
266+
git diff --color=always; exit 1;
267+
}
264268
265269
- name: Remove cache
266270
if: github.event_name == 'push'

0 commit comments

Comments
 (0)