Skip to content

Commit

Permalink
updated .envrc
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Aug 14, 2024
1 parent 326fc19 commit ace8215
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,20 @@ srcdir="$(cd "$(dirname "$src")" && pwd)"

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

if ! type -P pre-commit &>/dev/null &&
uname -s | grep -q Darwin &&
type -P brew &>/dev/null; then
echo
echo "Pre-commit is not installed - installing now..."
echo
brew install pre-commit
echo
if ! type -P pre-commit &>/dev/null; then
if uname -s | grep -q Darwin &&
type -P brew &>/dev/null; then
echo
echo "Pre-commit is not installed - installing now using Homebrew..."
echo
brew install pre-commit
echo
elif type -P pip &>/dev/null; then
echo
echo "Pre-commit is not installed - installing now using Pip..."
echo
pip install pre-commit
fi
fi

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

# ============================================================================ #
# . E n v
# ============================================================================ #

echo
Expand Down

0 comments on commit ace8215

Please sign in to comment.