aboutsummaryrefslogtreecommitdiffstats
path: root/git-tools/hooks/pre-commit
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-04-03 23:14:44 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-04-03 23:14:44 -0400
commitb803fc4351431bc53ee3221fa6232664134aa0ba (patch)
tree1960b0a56dc42113ad194108e4cd3eb758f127b6 /git-tools/hooks/pre-commit
parent786fcbf212caf4c201d9abba36fca3b8f58617a9 (diff)
downloadforums-b803fc4351431bc53ee3221fa6232664134aa0ba.tar
forums-b803fc4351431bc53ee3221fa6232664134aa0ba.tar.gz
forums-b803fc4351431bc53ee3221fa6232664134aa0ba.tar.bz2
forums-b803fc4351431bc53ee3221fa6232664134aa0ba.tar.xz
forums-b803fc4351431bc53ee3221fa6232664134aa0ba.zip
[ticket/10760] Quote PHP_BIN when using it.
This should make a difference on windows where paths may include spaces. PHPBB3-10760
Diffstat (limited to 'git-tools/hooks/pre-commit')
-rwxr-xr-xgit-tools/hooks/pre-commit4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-tools/hooks/pre-commit b/git-tools/hooks/pre-commit
index 0e230d3308..5be33fb9a1 100755
--- a/git-tools/hooks/pre-commit
+++ b/git-tools/hooks/pre-commit
@@ -36,7 +36,7 @@ fi
error=0
errors=""
-if ! which $PHP_BIN >/dev/null 2>&1
+if ! which "$PHP_BIN" >/dev/null 2>&1
then
echo "PHP Syntax check failed:"
echo "PHP binary does not exist or is not in path: $PHP_BIN"
@@ -73,7 +73,7 @@ do
# check the staged file content for syntax errors
# using php -l (lint)
- result=$(git cat-file -p $sha | $PHP_BIN -l 2>/dev/null)
+ result=$(git cat-file -p $sha | "$PHP_BIN" -l 2>/dev/null)
if [ $? -ne 0 ]
then
error=1