Browse Source

Add a workaround for Anaconda's `curl` issue

Anaconda's `curl` doesn't work with HTTPS on platfroms where
`/etc/pki/tls/certs/ca-bundle.crt` isn't available.
pull/498/head
Yamashita, Yuu 8 years ago
parent
commit
20432dda88
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      plugins/python-build/bin/pyenv-install

+ 2
- 1
plugins/python-build/bin/pyenv-install View File

@ -183,7 +183,8 @@ fi
# fail.) # fail.)
if [[ "${VERSION_NAME}" == [23]"."* ]]; then if [[ "${VERSION_NAME}" == [23]"."* ]]; then
for version in "${VERSION_NAME%-dev}" "${VERSION_NAME%.*}" "${VERSION_NAME%%.*}"; do for version in "${VERSION_NAME%-dev}" "${VERSION_NAME%.*}" "${VERSION_NAME%%.*}"; do
PYENV_VERSION="$(pyenv-whence "python${version}" 2>/dev/null | tail -n 1 || true)"
# Anaconda's `curl` doesn't work on platfrom where `/etc/pki/tls/certs/ca-bundle.crt` isn't available (e.g. Debian)
PYENV_VERSION="$(pyenv-whence "python${version}" 2>/dev/null | grep -v conda | tail -n 1 || true)"
if [ -n "${PYENV_VERSION}" ]; then if [ -n "${PYENV_VERSION}" ]; then
export PYENV_VERSION export PYENV_VERSION
break break

Loading…
Cancel
Save