Explorar o código

Fix retry.sh to more reliably provide command error output

Tianon Gravi %!s(int64=6) %!d(string=hai) anos
pai
achega
b566fadf8a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      test/retry.sh

+ 1 - 1
test/retry.sh

@@ -29,7 +29,7 @@ while ! eval "$@" &> /dev/null; do
 	if [ $tries -le 0 ]; then
 	if [ $tries -le 0 ]; then
 		echo >&2 "${image:-the container} failed to accept connections in a reasonable amount of time!"
 		echo >&2 "${image:-the container} failed to accept connections in a reasonable amount of time!"
 		[ "$cid" ] && ( set -x && docker logs "$cid" ) >&2 || true
 		[ "$cid" ] && ( set -x && docker logs "$cid" ) >&2 || true
-		eval "$@" # to hopefully get a useful error message
+		( set -x && eval "$@" ) >&2 || true # to hopefully get a useful error message
 		false
 		false
 	fi
 	fi
 	if [ "$cid" ] && [ "$(docker inspect -f '{{.State.Running}}' "$cid" 2>/dev/null)" != 'true' ]; then
 	if [ "$cid" ] && [ "$(docker inspect -f '{{.State.Running}}' "$cid" 2>/dev/null)" != 'true' ]; then