Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for cases in the virtualenv plugin where pyenv is present but pyenv virtualenvwrapper isn't #2288

Merged
merged 4 commits into from
Feb 11, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Check for the whole pyenv command instead of just pyenv
LoKolbasz committed Feb 11, 2025
commit f170938bdc2c5f99550953466fa6c4ac4106023a
5 changes: 4 additions & 1 deletion plugins/available/virtualenv.plugin.bash
Original file line number Diff line number Diff line change
@@ -5,11 +5,14 @@
cite about-plugin
about-plugin 'virtualenvwrapper and pyenv-virtualenvwrapper helper functions'

if _command_exists pyenv; then
# Check for whole command instead of just pyenv
if [ -n "$(pyenv virtualenvwrapper --help 2> /dev/null)" ]; then
pyenv virtualenvwrapper
elif _command_exists virtualenvwrapper.sh; then
# shellcheck disable=SC1091
source virtualenvwrapper.sh
else
log_debug "${2:-'virtualenvwrapper' was not found}"
fi

function mkvenv {