Skip to content

Commit 821984f

Browse files
committed
external_deps: print error when curl not found
Also allow --help without curl.
1 parent b0c63f7 commit 821984f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

external_deps/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ set -u -e -o pipefail
66
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
77
WORK_DIR="${PWD}"
88

9-
# Do not reuse self-built curl from external_deps custom PATH
10-
# to download source archives or we would get errors like:
11-
# curl: (1) Protocol "https" not supported or disabled in libcurl
12-
CURL="$(command -v curl)"
13-
149
# This should match the DEPS_VERSION in CMakeLists.txt.
1510
# This is mostly to ensure the path the files end up at if you build deps yourself
1611
# are the same as the ones when extracting from the downloaded packages.
@@ -1263,6 +1258,11 @@ if [ "${#}" -lt "2" ]; then
12631258
errorHelp
12641259
fi
12651260

1261+
# Do not reuse self-built curl from external_deps custom PATH
1262+
# to download source archives or we would get errors like:
1263+
# curl: (1) Protocol "https" not supported or disabled in libcurl
1264+
CURL="$(command -v curl)" || log error "Command 'curl' not found"
1265+
12661266
# Enable parallel build
12671267
export MAKEFLAGS="-j`nproc 2> /dev/null || sysctl -n hw.ncpu 2> /dev/null || echo 1`"
12681268

0 commit comments

Comments
 (0)