From: Jacob Bachmeyer Date: Thu, 27 Oct 2022 04:05:20 +0000 (-0500) Subject: Also avoid further processing after other errors in directive files X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=591244c4f1874f536ca6fd7a3ad244e17f08385e;p=gatekeeper.git Also avoid further processing after other errors in directive files --- diff --git a/gatekeeper.pl b/gatekeeper.pl index 9e54469..7d840d8 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -1694,10 +1694,12 @@ sub interpret_directive { my $val = $1; # so far so good # Only let them specify one filename directive. - push @errors, - "Only one filename directive is allowed per directive file. " - ."Error at filename directive: $val." - if defined $header{filename}; + if (defined $header{filename}) { + push @errors, + "Only one filename directive is allowed per directive file. " + ."Error at filename directive: $val."; + next; + } $header{filename} = $val; $info{"filename"} = {"value" => $val, "order" => $cnt++}; # ok. @@ -1735,9 +1737,11 @@ sub interpret_directive { next; } - push @errors, - "invalid directive 'replace', not supported prior to version 1.2" - if $header{version} eq '1.1'; + if ($header{version} eq '1.1') { + push @errors, + "invalid directive 'replace', not supported prior to version 1.2"; + next; + } $options{replace} = ($1 eq 'true'); $info{"replace"} = $1; #ok.