Skip to content

Commit

Permalink
Fix errorneously creating a symlink inside env directory if running w…
Browse files Browse the repository at this point in the history
…ith -f (#496)
  • Loading branch information
native-api authored Dec 8, 2024
1 parent db299ca commit e8c8fd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/pyenv-virtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,8 @@ fi

## Create symlink in the `versions` directory for backward compatibility
if [ -d "${VIRTUALENV_PATH}" ] && [ -n "${COMPAT_VIRTUALENV_PATH}" ]; then
ln -fs "${VIRTUALENV_PATH}" "${COMPAT_VIRTUALENV_PATH}"
# Overwrite an existing link, can happen if running with -f
ln -fsn "${VIRTUALENV_PATH}" "${COMPAT_VIRTUALENV_PATH}"
fi

if [ ! -e "${VIRTUALENV_PATH}/bin/pydoc" ]; then
Expand Down

0 comments on commit e8c8fd9

Please sign in to comment.