Change pre-commit hook to call commands in new shell
This commit is contained in:
parent
8b6ae1804e
commit
50c1f72172
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue