t/test-lib: fix TAP format for BASH_XTRACEFD warning

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>
This commit is contained in:
Patrick Steinhardt
2025-06-02 08:44:46 +02:00
committed by Junio C Hamano
parent d411d3d837
commit d4ea24b8a9

View File

@@ -470,7 +470,7 @@ then
then then
: Executed by a Bash version supporting BASH_XTRACEFD. Good. : Executed by a Bash version supporting BASH_XTRACEFD. Good.
else else
echo >&2 "warning: ignoring -x; '$0' is untraceable without BASH_XTRACEFD" echo >&2 "# warning: ignoring -x; '$0' is untraceable without BASH_XTRACEFD"
trace= trace=
fi fi
fi fi