Explorar o código

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>
leonnicolas %!s(int64=5) %!d(string=hai) anos
pai
achega
86eea326db
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      e2e/lib.sh

+ 2 - 2
e2e/lib.sh

@@ -16,9 +16,9 @@ retry() {
 		if "$@"; then
 		if "$@"; then
 			return 0
 			return 0
 		else
 		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
 			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"
 				sleep "$SLEEP"
 			fi
 			fi
 		fi
 		fi