Skip to content

Commit

Permalink
tlp-readconfs: ignore trailing blanks on non-quoted parameter values
Browse files Browse the repository at this point in the history
  • Loading branch information
linrunner committed Sep 23, 2021
1 parent 9f15b87 commit 1dba443
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tlp-readconfs.in
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ sub parse_configfile {
my $ln = 0;
while ( my $line = <$cf> ) {
chomp $line;
$line =~ s/\s+$//;
$ln += 1;
# select lines with format 'PARAMETER=value' or 'PARAMETER="value"'
if ( $line =~ /^(?<name>[A-Z_]+[0-9]*)(?<op>(=|\+=))(?:(?<val_bare>[-0-9a-zA-Z _.:]*)|"(?<val_dquoted>[-0-9a-zA-Z _.:]*)")\s*$/ ) {
Expand Down

0 comments on commit 1dba443

Please sign in to comment.