test-documentation: Send messages to stderr, not stdout.

Generally stderr is the conventional place for this sort of running
commentary, and it's better set up for it: by default stdout may have
a buffer inside the process so that things written to it don't reach
the outside until later, while stderr is always by default unbuffered,
so messages are printed immediately.

Here, until the previous commit, because our color-reset sequence was
being printed without a following newline (with `echo -n`), it was
getting buffered; and then error messages from `scrapy` to stderr were
being erroneously painted with the color intended for the message
"Testing links in documentation...".
This commit is contained in:
Greg Price 2018-01-09 10:15:49 -08:00
parent 618beb7110
commit d66f081af8
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ set -e
color_message () { color_message () {
local color_code="$1" message="$2" local color_code="$1" message="$2"
echo -e "\e[${color_code}m${message}\e[0m" echo -e "\e[${color_code}m${message}\e[0m" >&2
} }
case $1 in case $1 in