mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-14 06:23:52 -05:00
fish: use "set -gx" instead of "setenv" (#218)
Use `set -gx` instead of `setenv` for fish shell. Fix test "activate if the first virtualenv is a virtualenv": it was asserting the output was of bash form, but not specifying that in the test — it now does. Fixes https://github.com/pyenv/pyenv-virtualenv/issues/216.
This commit is contained in:
committed by
Daniel Hahler
parent
252d6763f9
commit
862be21a32
@@ -125,7 +125,7 @@ case "${shell}" in
|
||||
fish )
|
||||
cat <<EOS
|
||||
if [ -n "\$_OLD_VIRTUAL_PATH" ];
|
||||
setenv PATH "\$_OLD_VIRTUAL_PATH";
|
||||
set -gx PATH "\$_OLD_VIRTUAL_PATH";
|
||||
set -e _OLD_VIRTUAL_PATH;
|
||||
end;
|
||||
EOS
|
||||
@@ -144,7 +144,7 @@ case "${shell}" in
|
||||
fish )
|
||||
cat <<EOS
|
||||
if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
|
||||
setenv PYTHONHOME "\$_OLD_VIRTUAL_PYTHONHOME";
|
||||
set -gx PYTHONHOME "\$_OLD_VIRTUAL_PYTHONHOME";
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME;
|
||||
end;
|
||||
EOS
|
||||
|
||||
Reference in New Issue
Block a user