aboutsummaryrefslogtreecommitdiffstats
path: root/git-tools
diff options
context:
space:
mode:
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