-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #1775 tbg config newline check #1777
Fix #1775 tbg config newline check #1777
Conversation
…n` after `\r` as whitespace instead of being part of the newline.
@@ -374,12 +374,29 @@ if [ ! -f "$cfg_file" ] ; then | |||
fi | |||
|
|||
# cfg file sanity check - space after \ at EOL ? | |||
cfg_err=`egrep "\\\\\[[:space:]]+$" $cfg_file | wc -l` | |||
cfg_err=`egrep "\\\\\[[:blank:]]+$" $cfg_file | wc -l` | |||
if [ $cfg_err != 0 ] ; then | |||
echo "ERROR: file \"$cfg_file\" contains spaces after line continuation \\" | |||
echo "Check the following lines for end-of-line spaces:" | |||
echo "" | |||
egrep -n "\\\[[:space:]]+$" $cfg_file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:space:
should be :blank:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason it is once 5x and an other time 3x \
? Afaik, -n
does not change the syntax of egrep
, does it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it: 4043dce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea, I am just the pattern matching boy. I see stuff and replace it with other stuff. I am not paid to think about the stuff! 😜
This PR fixes the check for end lines allowing windows new lines (Issue #1775)
Furthermore as tbg does only support unix new lines, the config files are check for this trait.