-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add wrapper script for phpcbf to convert 1 exit code to 0 exit code
Fixes #2111
- Loading branch information
1 parent
a5a6f05
commit ce85484
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
# Wrap phpcbf to turn 1 success exit code into 0 code. | ||
# See https://github.com/squizlabs/PHP_CodeSniffer/issues/1818#issuecomment-354420927 | ||
|
||
root=$( dirname "$0" )/.. | ||
|
||
"$root/vendor/bin/phpcbf" $@ | ||
exit=$? | ||
|
||
# Exit code 1 is used to indicate that all fixable errors were fixed correctly. | ||
if [[ $exit == 1 ]]; then | ||
exit=0 | ||
fi | ||
|
||
exit $exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters