1. Doug Hellmann
  2. virtualenvwrapper

Commits

Daniel Hahler  committed 9cb762a

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).

  • Participants
  • Parent commits f0f0077
  • Branches master

Comments (0)

Files changed (1)

File virtualenvwrapper_lazy.sh

View file
  • Ignore whitespace
 
 if [ -z "$VIRTUALENVWRAPPER_SCRIPT" ]
 then
-	export VIRTUALENVWRAPPER_SCRIPT="$(which virtualenvwrapper.sh)"
+	export VIRTUALENVWRAPPER_SCRIPT="$(command \which virtualenvwrapper.sh)"
 fi
 if [ -z "$VIRTUALENVWRAPPER_SCRIPT" ]
 then