Skip to content

Commit f42295e

Browse files
authored
Merge pull request #2288 from LoKolbasz/virtualenvwrapper-fix
Fix for cases in the virtualenv plugin where pyenv is present but pyenv virtualenvwrapper isn't
2 parents d8eafdd + 51a0978 commit f42295e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/available/virtualenv.plugin.bash

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
cite about-plugin
66
about-plugin 'virtualenvwrapper and pyenv-virtualenvwrapper helper functions'
77

8-
if _command_exists pyenv; then
8+
# Check for whole command instead of just pyenv
9+
if [ -n "$(command pyenv virtualenvwrapper --help 2> /dev/null)" ]; then
910
pyenv virtualenvwrapper
1011
elif _command_exists virtualenvwrapper.sh; then
1112
# shellcheck disable=SC1091
1213
source virtualenvwrapper.sh
14+
else
15+
_log_debug "${2:-'virtualenvwrapper' was not found}"
1316
fi
1417

1518
function mkvenv {

0 commit comments

Comments
 (0)