aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2010-08-18 22:52:26 -0400
committerAndreas Fischer <bantu@phpbb.com>2010-08-19 17:44:54 +0200
commit90d8fc7e869852bb5a6beadc63c52ea9cdb51adf (patch)
tree2bbcdb884751cec1dd581e26a6a0ddd5065067e1 /git-tools/hooks
parentMerge branch 'ticket/bantu/9694' into develop-olympus (diff)
downloadphpbb-90d8fc7e869852bb5a6beadc63c52ea9cdb51adf.tar.gz
phpbb-90d8fc7e869852bb5a6beadc63c52ea9cdb51adf.tar.bz2
phpbb-90d8fc7e869852bb5a6beadc63c52ea9cdb51adf.zip
[ticket/9777] Print error message in pre-commit hook when php is not installed.
PHPBB3-9777
Diffstat (limited to 'git-tools/hooks')
-rwxr-xr-xgit-tools/hooks/pre-commit7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-tools/hooks/pre-commit b/git-tools/hooks/pre-commit
index 9719b91746..4d03359773 100755
--- a/git-tools/hooks/pre-commit
+++ b/git-tools/hooks/pre-commit
@@ -27,6 +27,13 @@ fi
error=0
errors=""
+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"
+ exit 1
+fi
+
# dash does not support $'\n':
# http://forum.soft32.com/linux2/Bug-409179-DASH-Settings-IFS-work-properly-ftopict70039.html
IFS='