aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2010-04-03 02:12:21 +0100
committerChris Smith <toonarmy@phpbb.com>2010-04-03 02:12:21 +0100
commitb6920b7ca8a6859bf9f76247b882dbd9331a9c78 (patch)
tree57ccdc553e72529f64cabc2633b1dbb215c5e0d1 /git-tools
parent[git-tools] Display what parse errors were found. (diff)
downloadphpbb-b6920b7ca8a6859bf9f76247b882dbd9331a9c78.tar.gz
phpbb-b6920b7ca8a6859bf9f76247b882dbd9331a9c78.tar.bz2
phpbb-b6920b7ca8a6859bf9f76247b882dbd9331a9c78.zip
[git-tools] Use env to find the correct paths to binaries.
Diffstat (limited to 'git-tools')
-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 a7deea43c5..151c604c30 100755
--- a/git-tools/hooks/pre-commit
+++ b/git-tools/hooks/pre-commit
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# A hook to disallow php syntax errors to be committed
# by running php -l (lint) on them. It requires php-cli
@@ -53,7 +53,7 @@ do
# check the staged file content for syntax errors
# using php -l (lint)
- result=$(git cat-file -p $sha | $PHP_BIN -l)
+ result=$(git cat-file -p $sha | /usr/bin/env $PHP_BIN -l)
if [ $? -ne 0 ]
then
error=1