aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2010-08-19 17:26:35 +0100
committerChris Smith <toonarmy@phpbb.com>2010-08-19 17:26:35 +0100
commit0ee49ca432a4ba334c529e973dd10c85f38452f4 (patch)
tree3aa537e6339705e840a41249e0da2ecdc4794c2a
parent3eb01d50cb2aeef34d02bca789d5db4b1fb50926 (diff)
parent90d8fc7e869852bb5a6beadc63c52ea9cdb51adf (diff)
downloadforums-0ee49ca432a4ba334c529e973dd10c85f38452f4.tar
forums-0ee49ca432a4ba334c529e973dd10c85f38452f4.tar.gz
forums-0ee49ca432a4ba334c529e973dd10c85f38452f4.tar.bz2
forums-0ee49ca432a4ba334c529e973dd10c85f38452f4.tar.xz
forums-0ee49ca432a4ba334c529e973dd10c85f38452f4.zip
Merge branch 'ticket/bantu/9777' into develop-olympus
* ticket/bantu/9777: [ticket/9777] Print error message in pre-commit hook when php is not installed.
-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='