mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-16 15:33:51 -05:00
Fix issues with manual activation of virtual environments (#34)
This commit is contained in:
@@ -99,17 +99,20 @@ if [ -z "$no_shell" ]; then
|
||||
echo "pyenv shell \"${versions}\";"
|
||||
fi
|
||||
|
||||
prefix="$(pyenv-prefix "${versions}")"
|
||||
case "$shell" in
|
||||
fish )
|
||||
cat <<EOS
|
||||
set -e PYENV_DEACTIVATE;
|
||||
. "$(pyenv-prefix "${versions}")/bin/activate.fish";
|
||||
setenv PYENV_ACTIVATE "${prefix}";
|
||||
. "${prefix}/bin/activate.fish";
|
||||
EOS
|
||||
;;
|
||||
* )
|
||||
cat <<EOS
|
||||
unset PYENV_DEACTIVATE;
|
||||
source "$(pyenv-prefix "${versions}")/bin/activate";
|
||||
export PYENV_ACTIVATE="${prefix}";
|
||||
source "${prefix}/bin/activate";
|
||||
EOS
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user