From bd8f7c54ee3a5931fc6b6cd410213ebb0cc62b25 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Mon, 18 Feb 2019 22:09:33 +0000 Subject: [PATCH] Warn early if proxy not reachable Avoids a later failure with a less informative message. See #248 --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sh b/build.sh index 22d3a90..c41a87f 100755 --- a/build.sh +++ b/build.sh @@ -203,6 +203,11 @@ if [[ ! "$FIRST_USER_NAME" =~ ^[a-z][-a-z0-9_]*$ ]]; then exit 1 fi +if [[ -n "${APT_PROXY}" ]] && ! curl --silent ${APT_PROXY} >/dev/null ; then + echo "Could not reach APT_PROXY server:" ${APT_PROXY} + exit 1 +fi + dependencies_check "${BASE_DIR}/depends" mkdir -p "${WORK_DIR}"