We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af09928 commit f3a9715Copy full SHA for f3a9715
1 file changed
.husky/pre-commit
@@ -1,10 +1,14 @@
1
#!/usr/bin/env sh
2
. "$(dirname -- "$0")/_/husky.sh"
3
4
-bash <<EOF
+if ! bash <<EOF
5
+ set -e
6
TO_PRETTIFY="$(git diff --diff-filter=ACMTUXB --name-only --staged | grep -E -e '\.[jt]sx?$' -e '\.md$' -e '\.html$' -e '\.json$' || :) )"
7
if [[ -n "$TO_PRETTIFY" ]]; then npm run prettify $TO_PRETTIFY; fi
8
npm test
9
FAIL_ON_PENDING=true npm run notify-unpushed -- src/secrets
10
npm run secrets-check
11
EOF
12
+then
13
+ exit 1
14
+fi
0 commit comments