gbranden pushed a commit to branch master
in repository groff.
commit b840ecef992d152d201962891a69f28e5de10048
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Nov 8 09:25:58 2024 -0600
[grog]: Fix Savannah #66429.
* src/utils/grog/grog.pl (construct_command): Check for truthiness of
`main_package` scalar before using it in comparison, avoiding the
emission of Perl warnings.
Fixes <https://savannah.gnu.org/bugs/?66429>. Problem introduced by me
prior to groff 1.23.0 when I rewrote the tool.
---
ChangeLog | 9 +++++++++
src/utils/grog/grog.pl | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f5ba5759a..6f98b842c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-11-08 G. Branden Robinson <[email protected]>
+
+ * src/utils/grog/grog.pl (construct_command): Check for
+ truthiness of `main_package` scalar before using it in
+ comparison, avoiding the emission of Perl warnings.
+
+ Fixes <https://savannah.gnu.org/bugs/?66429>. Problem
+ introduced by me prior to groff 1.23.0 when I rewrote the tool.
+
2024-11-07 G. Branden Robinson <[email protected]>
[grops]: Further revise fix for Savannah #61424. Instead of
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index c0d9d555d..1b4aac64a 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -638,11 +638,11 @@ sub construct_command {
my $is_auxiliary_package = 1;
if (grep(/$pkg/, @main_package)) {
$is_auxiliary_package = 0;
- if ($pkg ne $main_package) {
+ if ($main_package && ($pkg ne $main_package)) {
&warn("overriding inferred package '$main_package'"
. " with requested package '$pkg'");
- $main_package = $pkg;
}
+ $main_package = $pkg;
}
if ($is_auxiliary_package) {
push @auxiliary_package_argument, "-m" . $pkg;
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit