Skip to content

Commit

Permalink
Merge pull request Bash-it#2288 from LoKolbasz/virtualenvwrapper-fix
Browse files Browse the repository at this point in the history
Fix for cases in the virtualenv plugin where pyenv is present but pyenv virtualenvwrapper isn't
  • Loading branch information
seefood authored Feb 11, 2025
2 parents d8eafdd + 51a0978 commit f42295e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/available/virtualenv.plugin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$(command 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 {
Expand Down

0 comments on commit f42295e

Please sign in to comment.