]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
lint-man.mk: lint-man-groff-eqn: Fix error detection
authorAlejandro Colomar <alx@kernel.org>
Fri, 10 Mar 2023 12:21:12 +0000 (13:21 +0100)
committerAlejandro Colomar <alx@kernel.org>
Fri, 10 Mar 2023 12:21:14 +0000 (13:21 +0100)
eqn(1) could theoretically write _only_ newlines to standard error.
That's unlikely, but I'm still worried that someone (even me) might copy
this trick around, and use it in situations where that might actually
happen.  Let's be more precise, and fail when there's literally anything
on standard error.

Reported-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/lint-man.mk

index 0583964b4c009ab6bf6f8494b5a7e0d1f156a9aa..d47aadc7184ea303071c848cbc41c14a7baf5ed4 100644 (file)
@@ -96,7 +96,7 @@ $(_LINT_man_groff_eqn): %.eqn: %.tbl | $$(@D)/.
 $(_LINT_man_groff_troff): %.troff: %.eqn | $$(@D)/.
        $(info LINT (eqn)       $@)
        $(EQN) $(EQNFLAGS) <$< 2>&1 >$@ \
-       | ( ! $(GREP) . )
+       | ( ! $(GREP) ^ )
 
 $(_LINT_man_groff_grotty): %.grotty: %.troff | $$(@D)/.
        $(info LINT (troff)     $@)