Fix incorrect error messages for empty directives
authorJacob Bachmeyer <jcb@gnu.org>
Sat, 5 Nov 2022 21:13:12 +0000 (16:13 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Sat, 5 Nov 2022 21:13:12 +0000 (16:13 -0500)
gatekeeper.pl

index 975b4405ba39030623fee711f3c2bd18c2add0ca..9f453f4c7f4aeef50ecda7db8099db8e5ce5d40e 100755 (executable)
@@ -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';