mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-27 08:10:08 +00:00
Fix workon_cwd to detect git subtree
In a `git subtree` working directory, `.git` is a file containing a path to the parent git working direcotry. This change attempts to find a virtualenv for a subtree.
This commit is contained in:
parent
e32d4b1e19
commit
a5505119dd
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
|||
# Get absolute path, resolving symlinks
|
||||
local PROJECT_ROOT="${PWD:A}"
|
||||
while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" \
|
||||
&& ! -d "$PROJECT_ROOT/.git" ]]; do
|
||||
&& ! -e "$PROJECT_ROOT/.git" ]]; do
|
||||
PROJECT_ROOT="${PROJECT_ROOT:h}"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue