Fix retry.sh to more reliably provide command error output

This commit is contained in:
Tianon Gravi 2019-08-09 16:20:33 -07:00
parent 07dd0643ac
commit b566fadf8a
1 changed files with 1 additions and 1 deletions

View File

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