Force phpcbf to exit with 0

This commit is contained in:
alistair3149 2019-12-30 19:04:02 -05:00
parent 4eaf207f4c
commit b0da156290
No known key found for this signature in database
GPG key ID: 94D081060FD3DD9C

View file

@ -1,17 +1,8 @@
#!/bin/bash # Force phpcbf to exit with zero
# Wrap phpcbf to turn 1 success exit code into 0 code.
# See https://github.com/squizlabs/PHP_CodeSniffer/issues/1818#issuecomment-354420927 # See https://github.com/squizlabs/PHP_CodeSniffer/issues/1818#issuecomment-354420927
root=$( dirname $0 )/.. root=$( dirname $0 )/..
$root/vendor/bin/phpcbf $@ $root/vendor/bin/phpcbf
exit=$?
echo $? exit 0
# Exit code 1 is used to indicate that all fixable errors were fixed correctly.
if [[ $exit == 1 ]]; then
exit=0
fi
exit $exit