From 7f6b0525db4a67fb13cddc64187813906f26a5a7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 13 Sep 2017 13:26:43 -0700 Subject: [PATCH] Add a hard timeout on "docker pull" in hello-world/update.sh --- hello-world/update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hello-world/update.sh b/hello-world/update.sh index 5d2841cc4..08fc81707 100755 --- a/hello-world/update.sh +++ b/hello-world/update.sh @@ -3,8 +3,8 @@ set -Eeuo pipefail image="${1:-hello-world}" -docker pull hello-world &> /dev/null || exit 0 -docker pull "$image" &> /dev/null || exit 0 +timeout 5s docker pull hello-world &> /dev/null || exit 0 +timeout 5s docker pull "$image" &> /dev/null || exit 0 exec > "$(dirname "$(readlink -f "$BASH_SOURCE")")/content.md"