Skip to content

Commit

Permalink
e2e/lib.sh: print to stderr in retry
Browse files Browse the repository at this point in the history
This way callers of retry can check against the returned value and not
the logged strings.

Signed-off-by: leonnicolas <[email protected]>
  • Loading branch information
leonnicolas authored and squat committed Jul 6, 2021
1 parent f251ddd commit 86eea32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2e/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86eea32

Please sign in to comment.