mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-03 22:36:27 +00:00
Use xargs for syntax check to fail on error
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
# Check syntax in php files.
|
||||
find . -type "f" -iname "*.php" ! -path "*/vendor/*" -exec php -l {} \;
|
||||
# Check syntax in php files. Use `xargs' over `find -exec' as xargs exits with a value of 1 when any command errors.
|
||||
find . -type "f" -iname "*.php" ! -path "*/vendor/*" | xargs -L "1" php -l
|
||||
|
||||
errors=0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user