Skip to content

Commit 978d5a0

Browse files
committed
updated .envrc
1 parent 6e7c404 commit 978d5a0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.envrc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ srcdir="$(cd "$(dirname "$src")" && pwd)"
5252

5353
# Automatically install Pre-Commit Git hooks if not already present
5454

55-
if [ -f .pre-commit-config.yaml ]; then
56-
if [ -d .git ]; then
57-
if ! [ -f .git/hooks/pre-commit ]; then
58-
pre-commit install
59-
fi
55+
if [ -f .pre-commit-config.yaml ] &&
56+
[ -d .git ] &&
57+
type -P pre-commit &>/dev/null; then
58+
if ! [ -f .git/hooks/pre-commit ]; then
59+
pre-commit install
6060
fi
6161
fi
6262

0 commit comments

Comments
 (0)