diff options
Diffstat (limited to 'git-tools/hooks/pre-commit')
-rwxr-xr-x | git-tools/hooks/pre-commit | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/git-tools/hooks/pre-commit b/git-tools/hooks/pre-commit index 4a070d130c..937d2d2dc0 100755 --- a/git-tools/hooks/pre-commit +++ b/git-tools/hooks/pre-commit @@ -28,13 +28,12 @@ IFS=" " for file in $(git diff --cached --name-status $against | grep -v -E '^D' | cut -f2 | grep -E '\.php$') do # store lint result in a temp file - tempfile="/tmp/$(basename $0).$$.tmp" + tempfile=$(mktemp -t "$(basename $0).XXXXXX") if ! php -l "$file" >/dev/null 2>"$tempfile" then error=1 cat "$tempfile" fi - rm -f "$tempfile" done unset IFS |