Skip to content

Commit b9435d5

Browse files
committed
Enclose file paths in double quotes to capture spaces
1 parent 3e6b851 commit b9435d5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

admin/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ SFILES=${SFILES:-$STAGED_FILES_CMD}
1717
echo "Checking PHP Lint..."
1818
for FILE in $SFILES
1919
do
20-
php -l -d display_errors=0 $PROJECT/$FILE
20+
php -l -d display_errors=0 "$PROJECT/$FILE"
2121
if [ $? != 0 ]
2222
then
2323
echo "Fix the error before commit."
2424
exit 1
2525
fi
26-
FILES="$FILES $PROJECT/$FILE"
26+
FILES="$FILES $FILE"
2727
done
2828

2929
if [ "$FILES" != "" ]

0 commit comments

Comments
 (0)