Browse Source

Use glob to check if the virtualenv is inside pyenv's prefix or not

pull/123/head
Yamashita, Yuu 8 years ago
parent
commit
0bbb12a3bf
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      bin/pyenv-sh-activate

+ 1
- 1
bin/pyenv-sh-activate View File

@ -70,7 +70,7 @@ fi
venv="${versions}"
# exit as success if some virtualenv outside from pyenv is already activated
if [ -n "${VIRTUAL_ENV}" ] && [[ "${VIRTUAL_ENV}" == "${VIRTUAL_ENV#${PYENV_ROOT}/versions/}" ]]; then
if [ -n "${VIRTUAL_ENV}" ] && [[ "${VIRTUAL_ENV}" != "${PYENV_ROOT}/versions/"* ]]; then
if [ -z "${FORCE}" ]; then
if [ -z "${QUIET}" ]; then
echo "pyenv-virtualenv: virtualenv \`${VIRTUAL_ENV}' is already activated" 1>&2

Loading…
Cancel
Save