mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2026-09-10 07:16:18 -04:00
Merge pull request #232 from logikone/fix-force-option
evaluate force flag before testing if venv exists
This commit is contained in:
commit
b4eb09d1dd
|
|
@ -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