mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
Use cd -P instead of realpath (fixes #4030)
This commit is contained in:
parent
599831b85a
commit
403859ae80
1 changed files with 2 additions and 2 deletions
|
|
@ -36,10 +36,10 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
||||||
function workon_cwd {
|
function workon_cwd {
|
||||||
if [ ! $WORKON_CWD ]; then
|
if [ ! $WORKON_CWD ]; then
|
||||||
WORKON_CWD=1
|
WORKON_CWD=1
|
||||||
# Check if this is a Git repo
|
# Look for a proper PROJECT_ROOT path
|
||||||
PROJECT_ROOT=`pwd`
|
PROJECT_ROOT=`pwd`
|
||||||
while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do
|
while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do
|
||||||
PROJECT_ROOT=`realpath $PROJECT_ROOT/..`
|
PROJECT_ROOT=$(cd -P "$PROJECT_ROOT/.."; pwd)
|
||||||
done
|
done
|
||||||
if [[ "$PROJECT_ROOT" == "/" ]]; then
|
if [[ "$PROJECT_ROOT" == "/" ]]; then
|
||||||
PROJECT_ROOT="."
|
PROJECT_ROOT="."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue