mirror of
https://github.com/google/nomulus.git
synced 2025-04-29 19:47:51 +02:00
Terminate with exit code of 1 on format check fail (#1570)
The format check script currently outputs "true" if there were files that need reformatting and "false" if not, which is useful for gradle but less so for other applications (notably commit hooks). Terminate with an exit code of 1 if the format check fails. TESTED: Tried this from both a pre-commit hook and from the gradle build.
This commit is contained in:
parent
914b795232
commit
b98822c17a
1 changed files with 2 additions and 1 deletions
|
@ -139,10 +139,11 @@ function isJavaFormatNeededOnDiffs() {
|
|||
|
||||
if [[ ${modifiedLineCount} -ne 0 ]]; then
|
||||
echo "true"
|
||||
exit 1
|
||||
else
|
||||
echo "false"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
# The main function of this script:
|
||||
|
|
Loading…
Add table
Reference in a new issue