8 lines
291 B
Bash
8 lines
291 B
Bash
|
|
#!/usr/bin/sh
|
||
|
|
# Pre-commit hook: block commits with hardcoded home-directory paths
|
||
|
|
# Install: cp scripts/pre-commit-hardcoded-paths.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
|
||
|
|
# Or: git config core.hooksPath .githooks
|
||
|
|
|
||
|
|
python3 scripts/lint_hardcoded_paths.py --staged
|
||
|
|
exit $?
|