mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-22 23:10:47 +00:00
Merge pull request #1051 from LWisteria/do_not_check_wget_version
Check wget version iff wget is going to be used
This commit is contained in:
commit
b6929531c6
1 changed files with 5 additions and 6 deletions
|
@ -330,6 +330,11 @@ http() {
|
||||||
elif type curl &>/dev/null; then
|
elif type curl &>/dev/null; then
|
||||||
"http_${method}_curl" "$url" "$file"
|
"http_${method}_curl" "$url" "$file"
|
||||||
elif type wget &>/dev/null; then
|
elif type wget &>/dev/null; then
|
||||||
|
# SSL Certificate error with older wget that does not support Server Name Indication (#60)
|
||||||
|
if [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then
|
||||||
|
echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
"http_${method}_wget" "$url" "$file"
|
"http_${method}_wget" "$url" "$file"
|
||||||
else
|
else
|
||||||
echo "error: please install \`aria2c\`, \`curl\` or \`wget\` and try again" >&2
|
echo "error: please install \`aria2c\`, \`curl\` or \`wget\` and try again" >&2
|
||||||
|
@ -2051,12 +2056,6 @@ if [[ "$PYTHON_CONFIGURE_OPTS" != *"--enable-unicode="* ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# SSL Certificate error with older wget that does not support Server Name Indication (#60)
|
|
||||||
if ! command -v curl 1>/dev/null 2>&1 && [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then
|
|
||||||
echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Unset `PIP_REQUIRE_VENV` during build (#216)
|
# Unset `PIP_REQUIRE_VENV` during build (#216)
|
||||||
unset PIP_REQUIRE_VENV
|
unset PIP_REQUIRE_VENV
|
||||||
unset PIP_REQUIRE_VIRTUALENV
|
unset PIP_REQUIRE_VIRTUALENV
|
||||||
|
|
Loading…
Reference in a new issue