Skip to content

Commit 9cb762a

Browse files
committed
Fix which with virtualenvwrapper_lazy.sh
`command \which` is used in virtualenvwrapper.sh, and it fixes an infinite loop, because VIRTUALENVWRAPPER_SCRIPT is not being setup correctly. In my zsh setup: % which virtualenvwrapper.sh sh: suffix aliased to zsh-mime-handler % command which virtualenvwrapper.sh /usr/local/bin/virtualenvwrapper.sh An alternative might be to use `which -p`, but that is probably zsh-only (not portable).
1 parent f0f0077 commit 9cb762a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

virtualenvwrapper_lazy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export _VIRTUALENVWRAPPER_API="$_VIRTUALENVWRAPPER_API mkvirtualenv rmvirtualenv
55

66
if [ -z "$VIRTUALENVWRAPPER_SCRIPT" ]
77
then
8-
export VIRTUALENVWRAPPER_SCRIPT="$(which virtualenvwrapper.sh)"
8+
export VIRTUALENVWRAPPER_SCRIPT="$(command \which virtualenvwrapper.sh)"
99
fi
1010
if [ -z "$VIRTUALENVWRAPPER_SCRIPT" ]
1111
then

0 commit comments

Comments
 (0)