Skip to content

Commit

Permalink
Merge pull request #2853 from paulbalandan/bugfix/precommit-filepath-…
Browse files Browse the repository at this point in the history
…spaces

Enclose file paths in double quotes to capture spaces
  • Loading branch information
lonnieezell authored Apr 21, 2020
2 parents 4216e19 + b9435d5 commit 0cf609e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ SFILES=${SFILES:-$STAGED_FILES_CMD}
echo "Checking PHP Lint..."
for FILE in $SFILES
do
php -l -d display_errors=0 $PROJECT/$FILE
php -l -d display_errors=0 "$PROJECT/$FILE"
if [ $? != 0 ]
then
echo "Fix the error before commit."
exit 1
fi
FILES="$FILES $PROJECT/$FILE"
FILES="$FILES $FILE"
done

if [ "$FILES" != "" ]
Expand Down

0 comments on commit 0cf609e

Please sign in to comment.