]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/test-lib: fix TAP format for BASH_XTRACEFD warning
authorPatrick Steinhardt <ps@pks.im>
Mon, 2 Jun 2025 06:44:46 +0000 (08:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Jun 2025 14:51:42 +0000 (07:51 -0700)
When the Bash version is too old to support BASH_XTRACEFD we print a
warning to stderr. This warning is not prefixed with "#", which causes
TAP parsers to (wrongly) interpret the warning as part of the protocol.

Fix this issue by prefixing the warning with a "#" so that it is treated
as comment.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh

index 6ce8570226c4797ab066a1d72a5260a871b049ee..8c0d76ea5f0dcec5cc192117005194d423f875a4 100644 (file)
@@ -470,7 +470,7 @@ then
        then
                : Executed by a Bash version supporting BASH_XTRACEFD.  Good.
        else
-               echo >&2 "warning: ignoring -x; '$0' is untraceable without BASH_XTRACEFD"
+               echo >&2 "warning: ignoring -x; '$0' is untraceable without BASH_XTRACEFD"
                trace=
        fi
 fi