Skip to content

Commit d134b0b

Browse files
committed
updated .envrc
1 parent f6f4567 commit d134b0b

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.envrc

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

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

55-
if ! type -P pre-commit &>/dev/null &&
56-
uname -s | grep -q Darwin &&
57-
type -P brew &>/dev/null; then
58-
echo
59-
echo "Pre-commit is not installed - installing now..."
60-
echo
61-
brew install pre-commit
62-
echo
55+
if ! type -P pre-commit &>/dev/null; then
56+
if uname -s | grep -q Darwin &&
57+
type -P brew &>/dev/null; then
58+
echo
59+
echo "Pre-commit is not installed - installing now using Homebrew..."
60+
echo
61+
brew install pre-commit
62+
echo
63+
elif type -P pip &>/dev/null; then
64+
echo
65+
echo "Pre-commit is not installed - installing now using Pip..."
66+
echo
67+
pip install pre-commit
68+
fi
6369
fi
6470

6571
if [ -f .pre-commit-config.yaml ] &&
@@ -188,6 +194,8 @@ if [ -f "$srcdir/.envrc-kubernetes" ]; then
188194
load_if_exists .envrc-kubernetes docker-desktop
189195
fi
190196

197+
# ============================================================================ #
198+
# . E n v
191199
# ============================================================================ #
192200

193201
echo

0 commit comments

Comments
 (0)