From d75c830a7e9cdc9b4bad3fa3808fe14219f721ce Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 5 Oct 2018 17:43:45 +0100 Subject: [PATCH] Add -f parameter to lint.sh to allow it to not be useless in cygwin find can conflict with windows' built in find command, which causes it to bug out when running tests. --- tests/lint.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/lint.sh b/tests/lint.sh index 085c7741b..6e5547f88 100755 --- a/tests/lint.sh +++ b/tests/lint.sh @@ -2,8 +2,9 @@ PHP_BINARY="php" DIR="" +FIND="find" -while getopts "p:d:" OPTION 2> /dev/null; do +while getopts "p:d:f:" OPTION 2> /dev/null; do case ${OPTION} in p) PHP_BINARY="$OPTARG" @@ -11,6 +12,9 @@ while getopts "p:d:" OPTION 2> /dev/null; do d) DIR="$OPTARG" ;; + f) + FIND="$OPTARG" + ;; esac done @@ -21,7 +25,7 @@ fi echo Running PHP lint scans on \"$DIR\"... -OUTPUT=`find "$DIR" -name "*.php" -print0 | xargs -0 -n1 -P4 "$PHP_BINARY" -l` +OUTPUT=`$FIND "$DIR" -name "*.php" -print0 | xargs -0 -n1 -P4 "$PHP_BINARY" -l` if [ $? -ne 0 ]; then echo $OUTPUT | grep -v "No syntax errors"