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
1 changed files with 2 additions and 2 deletions

View File

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