mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-14 04:42:04 +02:00
[ticket/15683] Better error message when commit message has CRLF
When someone tries to do a pull request with incorrect line breaks in the commit message, the error message as given by Travis is "Unexpected EOF encountered". The error message should be clearer that CR/LF was the problem. This change adds a separate check for CRLF line endings. PHPBB3-15683
This commit is contained in:
parent
b5a79d9a9d
commit
9068909051
@ -147,6 +147,15 @@ then
|
||||
quit $ERR_LENGTH;
|
||||
fi
|
||||
|
||||
# Check for CR/LF line breaks
|
||||
if grep -q $'\r$' "$1"
|
||||
then
|
||||
complain "The commit message uses CR/LF line breaks, which are not permitted." >&2
|
||||
complain >&2
|
||||
|
||||
quit $ERR_EOF;
|
||||
fi
|
||||
|
||||
lines=$(wc -l "$1" | awk '{ print $1; }');
|
||||
expecting=header;
|
||||
in_description=0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user