Add a hard timeout on "docker pull" in hello-world/update.sh

This commit is contained in:
Tianon Gravi 2017-09-13 13:26:43 -07:00
parent 663c346031
commit 7f6b0525db
1 changed files with 2 additions and 2 deletions

View File

@ -3,8 +3,8 @@ set -Eeuo pipefail
image="${1:-hello-world}" image="${1:-hello-world}"
docker pull hello-world &> /dev/null || exit 0 timeout 5s docker pull hello-world &> /dev/null || exit 0
docker pull "$image" &> /dev/null || exit 0 timeout 5s docker pull "$image" &> /dev/null || exit 0
exec > "$(dirname "$(readlink -f "$BASH_SOURCE")")/content.md" exec > "$(dirname "$(readlink -f "$BASH_SOURCE")")/content.md"