gbranden pushed a commit to branch master
in repository groff.

commit f6caa62c1aa6a0d8ad2843931640673aead3d355
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Aug 22 13:02:40 2026 -0500

    [grog]: Fix Savannah #68635.
    
    * src/utils/grog/grog.pl (process_arguments): Relocate test for
      `--debug` option such that we don't interpolate it into the argument
      list we build for groff, which won't recognize it.
    
    Fixes <https://savannah.gnu.org/bugs/?68635>.  Problem introduced by me
    in commit b161e50e93, 2026-07-17.
---
 ChangeLog              | 11 +++++++++++
 src/utils/grog/grog.pl |  9 ++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 81eca8e19..dfa51d942 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-08-22  G. Branden Robinson <[email protected]>
+
+       [grog]: Fix Savannah #68635.
+
+       * src/utils/grog/grog.pl (process_arguments): Relocate test for
+       `--debug` option such that we don't interpolate it into the
+       argument list we build for groff, which won't recognize it.
+
+       Fixes <https://savannah.gnu.org/bugs/?68635>.  Problem
+       introduced by me in commit b161e50e93, 2026-07-17.
+
 2026-08-16  G. Branden Robinson <[email protected]>
 
        [troff]: Fix Savannah #68616.
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index d7d926689..2c83d2764 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -112,6 +112,11 @@ sub process_arguments {
       next;
     }
 
+    if ($arg eq '--debug') {
+      $debugging = 1;
+      next; # Don't pass the option to groff.
+    }
+
     if ($delayed_option) {
       if ($delayed_option eq '-m') {
        push @requested_package, $arg;
@@ -149,9 +154,7 @@ sub process_arguments {
     version() if ($arg eq '-v' || $arg eq '--version');
     usage(0) if ($arg eq '-h' || $arg eq '--help');
 
-    if ($arg eq '--debug') {
-      $debugging = 1;
-    } elsif ($arg =~ '^--.') {
+    if ($arg =~ '^--.') {
       fail("unrecognized grog option '$arg'; ignored");
       usage(1);
       next;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to