Fix retry.sh to more reliably provide command error output
This commit is contained in:
parent
07dd0643ac
commit
b566fadf8a
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue