Change pre-commit hook to call commands in new shell

This commit is contained in:
Talia 2022-07-01 13:30:27 +02:00
parent 8b6ae1804e
commit 50c1f72172

View file

@ -27,7 +27,7 @@ cd $temp/index/
if [ -n "$filter" ]; then if [ -n "$filter" ]; then
ln -s $GIT_DIR/ .git ln -s $GIT_DIR/ .git
$filter sh -c "$filter"
git add --all git add --all
rm .git rm .git
fi fi
@ -35,7 +35,7 @@ fi
if [ -n "$validate" ]; then if [ -n "$validate" ]; then
/bin/echo -e "\x1b[33mValidating commit\x1b[0m" /bin/echo -e "\x1b[33mValidating commit\x1b[0m"
/bin/echo -e "\x1b[2mλ $validate\x1b[0m" /bin/echo -e "\x1b[2mλ $validate\x1b[0m"
if $validate if sh -c "$validate"
then then
/bin/echo -e "\x1b[32mValidation Passed!\x1b[0m" /bin/echo -e "\x1b[32mValidation Passed!\x1b[0m"
else else