From: Jacob Bachmeyer Date: Sat, 5 Nov 2022 21:13:12 +0000 (-0500) Subject: Fix incorrect error messages for empty directives X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3fe77cf1d2525512938cfb61f23e8db3e4769257;p=gatekeeper.git Fix incorrect error messages for empty directives --- diff --git a/gatekeeper.pl b/gatekeeper.pl index 975b440..9f453f4 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -2107,11 +2107,11 @@ sub validate_commands { # Check that we actually have at least one command in the directive unless ($#$ops > 0) { if (1 == scalar @$packet) { - throw directive_syntax => trace => $ops, + throw directive_syntax => trace => [], summary => 'nothing to do - no commands in directive file'; } else { # Provide a different message if this looks like an upload packet. - throw directive_syntax => trace => $ops, + throw directive_syntax => trace => [], summary => "no filename element in $stem.directive.asc." .' Upgrade to the latest version! ' .'See http://www.gnu.org/prep/maintain/maintain.html';