We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bf22bb commit 641cd0eCopy full SHA for 641cd0e
.githooks/pre-commit
@@ -0,0 +1,14 @@
1
+#!/usr/bin/env sh
2
+# Run deno precommit task. If deno isn't available, fail to avoid committing unformatted/unchecked code.
3
+# This script is POSIX shell compatible.
4
+if command -v deno >/dev/null 2>&1; then
5
+ deno task precommit
6
+ status=$?
7
+ if [ $status -ne 0 ]; then
8
+ echo "deno precommit task failed (exit $status). Commit aborted."
9
+ exit $status
10
+ fi
11
+else
12
+ echo "deno not found in PATH. Install Deno or run 'deno task precommit' manually."
13
+ exit 1
14
+fi
0 commit comments