From 50c1f721721d516881f1a475b048dae94edf7a33 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Fri, 1 Jul 2022 13:30:27 +0200 Subject: [PATCH] Change pre-commit hook to call commands in new shell --- githooks/pre-commit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/githooks/pre-commit b/githooks/pre-commit index 78a7749..6ae13c4 100755 --- a/githooks/pre-commit +++ b/githooks/pre-commit @@ -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