nix-config/.hooks/pre-commit
2024-10-03 23:04:17 +02:00

19 lines
207 B
Bash
Executable file

#!/usr/bin/env bash
git stash -q --keep-index
echo "checking flakes all compile"
nix flake check
if [ ! $? -eq 0 ]; then
exit 1
fi
echo "running linter"
./lint.sh
RESULT=$?
git add -u
exit $RESULT