All checks were successful
Lint / pre-commit Linting (push) Successful in 1m45s
17 lines
505 B
Bash
17 lines
505 B
Bash
#!/bin/bash
|
|
|
|
# 1. Fix Git Permissions (Critical in Docker)
|
|
sudo chown -R $(whoami) .git
|
|
git config --global --add safe.directory $(pwd)
|
|
|
|
# 2. Re-connect Git Hooks
|
|
# 'pre-commit install' is idempotent (it checks if the hook exists and exits fast).
|
|
# It's safe to run on every start.
|
|
if command -v pre-commit &> /dev/null; then
|
|
pre-commit install
|
|
else
|
|
echo "⚠️ Warning: pre-commit not found. Skipping hook installation."
|
|
fi
|
|
|
|
# We REMOVED 'npm install' from here to speed up your daily workflow.
|