[Hotfix] Search for .git rather than .venv inside loop.

This commit is contained in:
Oscar Giraldo Castillo 2015-06-19 18:43:58 -05:00
commit 18bf412bf0

View file

@ -38,7 +38,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
WORKON_CWD=1
# Check if this is a Git repo
PROJECT_ROOT=`pwd`
while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do
while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.git" ]]; do
PROJECT_ROOT=`realpath $PROJECT_ROOT/..`
done
if [[ "$PROJECT_ROOT" == "/" ]]; then