Skip to content

Commit

Permalink
[CI] Fix shell script exit codes (apache#3329)
Browse files Browse the repository at this point in the history
The exist code of a posix compilant shell is 0..255.  Attempting to
return -1 will error in some shells and implicitly cast to 255 in
others.  Fix it by returning a legal return value.
  • Loading branch information
mshawcroft authored and Wei Chen committed Jun 26, 2019
1 parent e19b899 commit 9b3a340
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/scripts/task_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if grep --quiet -E "File" /tmp/$$.apache-rat.txt; then
echo "- Create file_list.txt in your text editor"
echo "- Copy paste the above content in file-list into file_list.txt"
echo "- python3 tests/lint/add_asf_header.py file_list.txt"
exit -1
exit 1
fi

echo "Check codestyle of c++ code..."
Expand All @@ -59,5 +59,5 @@ echo "---------Error Log----------"
cat /tmp/$$.logclean.txt
echo "----------------------------"
if grep --quiet -E "warning|error" < /tmp/$$.logclean.txt; then
exit -1
exit 1
fi

0 comments on commit 9b3a340

Please sign in to comment.