Add missing declaration of virtualenv_prefix to fix looking up executables from source version (#62)

This commit is contained in:
Yamashita, Yuu
2016-01-12 00:30:50 +00:00
parent 433992e376
commit 4c8eeebbff

View File

@@ -37,8 +37,12 @@ if [ ! -x "${PYENV_COMMAND_PATH}" ]; then
if [ ! -f "${no_global_site_packages}" ]; then
include_system_site_packages=1
fi
virtualenv_orig_prefix="$(find "${virtualenv_libpath}/" -maxdepth 2 -type f -and -name "orig-prefix.txt" 2>/dev/null | head -1)"
if [ -f "${virtualenv_orig_prefix}" ]; then
virtualenv_prefix="$(cat "${virtualenv_orig_prefix}" 2>/dev/null || true)"
fi
if [ -n "${include_system_site_packages}" ]; then
fi
if [ -n "${include_system_site_packages}" ] && [ -n "${virtualenv_prefix}" ]; then
# virtualenv is created with `--system-site-packages`
virtualenv_command_path="${virtualenv_prefix}/bin/${PYENV_COMMAND_PATH##*/}"
if [ -x "${virtualenv_command_path}" ]; then