Fix errorneously creating a symlink inside env directory if running with -f (#496)
Some checks failed
tests / tests (macos-13) (push) Has been cancelled
tests / tests (macos-14) (push) Has been cancelled
tests / tests (ubuntu-20.04) (push) Has been cancelled
tests / tests (ubuntu-22.04) (push) Has been cancelled

This commit is contained in:
native-api
2024-12-08 23:30:27 +03:00
committed by GitHub
parent db299cada3
commit e8c8fd9b84

View File

@@ -631,7 +631,8 @@ fi
## Create symlink in the `versions` directory for backward compatibility ## Create symlink in the `versions` directory for backward compatibility
if [ -d "${VIRTUALENV_PATH}" ] && [ -n "${COMPAT_VIRTUALENV_PATH}" ]; then 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 fi
if [ ! -e "${VIRTUALENV_PATH}/bin/pydoc" ]; then if [ ! -e "${VIRTUALENV_PATH}/bin/pydoc" ]; then