nix-config/.hooks/pre-commit

18 lines
149 B
Bash
Executable file

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