3 Commits

Author SHA1 Message Date
k
3a4efe6a95 Merge 5d7894d189 into aa9b8e9a5a 2025-01-11 13:21:02 -05:00
Jason N. White
aa9b8e9a5a Update LICENSE, fix license year (#499)
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
Signed-off-by: JasonnnW3000 <sufssl04@gmail.com>
2025-01-01 20:46:21 +03:00
K Kollmann
5d7894d189 fix: PATH update for non-fish shells
Checks PATH variable for existing inclusion of shims
for shells other than fish.

See PR #430
2024-01-20 20:10:27 +01:00
3 changed files with 13 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
Copyright (c) 2015 Yamashita, Yuu
Copyright (c) 2025 Yamashita, Yuu
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -95,8 +95,10 @@ EOS
;;
* )
cat <<EOS
if [[ ":$PATH:" != *"${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims"* ]]; then
export PATH="${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims:\${PATH}";
export PYENV_VIRTUALENV_INIT=1;
fi
EOS
;;
esac

View File

@@ -50,8 +50,10 @@ load test_helper
run pyenv-virtualenv-init - bash
assert_success
assert_output <<EOS
if [[ ":$PATH:" != *"${TMP}/pyenv/plugins/pyenv-virtualenv/shims"* ]]; then
export PATH="${TMP}/pyenv/plugins/pyenv-virtualenv/shims:\${PATH}";
export PYENV_VIRTUALENV_INIT=1;
fi
_pyenv_virtualenv_hook() {
local ret=\$?
if [ -n "\${VIRTUAL_ENV-}" ]; then
@@ -93,8 +95,10 @@ EOS
run pyenv-virtualenv-init - zsh
assert_success
assert_output <<EOS
if [[ ":$PATH:" != *"${TMP}/pyenv/plugins/pyenv-virtualenv/shims"* ]]; then
export PATH="${TMP}/pyenv/plugins/pyenv-virtualenv/shims:\${PATH}";
export PYENV_VIRTUALENV_INIT=1;
fi
_pyenv_virtualenv_hook() {
local ret=\$?
if [ -n "\${VIRTUAL_ENV-}" ]; then