mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2026-09-10 07:16:18 -04:00
evaluate force flag before testing if venv exists
fixes #161, fixes #187
This commit is contained in:
parent
1e66783091
commit
52cb0b1086
|
|
@ -349,9 +349,11 @@ if [[ "${VIRTUALENV_PATH/*/envs/*}" != "${PYENV_ROOT}/versions" ]]; then
|
|||
fi
|
||||
|
||||
if [ -n "${COMPAT_VIRTUALENV_PATH}" ]; then
|
||||
if [ -e "${COMPAT_VIRTUALENV_PATH}" ] || [ -L "${COMPAT_VIRTUALENV_PATH}" ]; then
|
||||
echo "pyenv-virtualenv: \`${COMPAT_VIRTUALENV_PATH}' already exists." 1>&2
|
||||
exit 1
|
||||
if [ -z ${FORCE} ]; then
|
||||
if [ -e "${COMPAT_VIRTUALENV_PATH}" ] || [ -L "${COMPAT_VIRTUALENV_PATH}" ]; then
|
||||
echo "pyenv-virtualenv: \`${COMPAT_VIRTUALENV_PATH}' already exists." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue