e2e/lib.sh: print to stderr in retry

This way callers of retry can check against the returned value and not
the logged strings.

Signed-off-by: leonnicolas <leonloechner@gmx.de>
This commit is contained in:
leonnicolas 2021-07-05 22:09:43 +02:00 committed by Lucas Servén Marín
parent f251ddda98
commit 86eea326db
No known key found for this signature in database
GPG Key ID: 586FEAF680DA74AD
1 changed files with 2 additions and 2 deletions

View File

@ -16,9 +16,9 @@ retry() {
if "$@"; then
return 0
else
printf "%s(attempt %d/%d)\n" "$ERROR" "$c" "$COUNT" | color "$YELLOW"
printf "%s(attempt %d/%d)\n" "$ERROR" "$c" "$COUNT" | color "$YELLOW" 1>&2
if [ "$c" != "$COUNT" ]; then
printf "retrying in %d seconds...\n" "$SLEEP" | color "$YELLOW"
printf "retrying in %d seconds...\n" "$SLEEP" | color "$YELLOW" 1>&2
sleep "$SLEEP"
fi
fi