Files
element-call-Github/.githooks/pre-commit
2025-03-27 14:05:10 -04:00

13 lines
499 B
Bash
Executable File

#!/usr/bin/sh
FILE=".links.yaml"
if test -f "$FILE"; then
# echo "$FILE exists. -> moving to .links.disabled.yaml"
mv .links.yaml .links.disabled.yaml
# echo "running yarn"
x=$(yarn)
y=$(git add yarn.lock)
echo "[yarn-linker] The pre-commit hook has disabled .links.yaml and MODIFIED the yarn.lock file. Review the staged changes (the hook added yarn.lock, was this desired?) and run \`git commit \` again if they look okay. The post-commit hook will re-enable your links."
exit 1
fi