forked from extern/ohmyzsh
Merge pull request #4228 from mcornella/fix-virtualenvwrapper-quotes
[virtualenvwrapper] Add quotes to support folders with whitespace
This commit is contained in:
commit
20f536c064
@ -38,7 +38,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
|||||||
local WORKON_CWD=1
|
local WORKON_CWD=1
|
||||||
# Check if this is a Git repo
|
# Check if this is a Git repo
|
||||||
local GIT_REPO_ROOT=""
|
local GIT_REPO_ROOT=""
|
||||||
local GIT_TOPLEVEL=$(git rev-parse --show-toplevel 2> /dev/null)
|
local GIT_TOPLEVEL="$(git rev-parse --show-toplevel 2> /dev/null)"
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
GIT_REPO_ROOT="$GIT_TOPLEVEL"
|
GIT_REPO_ROOT="$GIT_TOPLEVEL"
|
||||||
fi
|
fi
|
||||||
@ -53,7 +53,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
# Check for virtualenv name override
|
# Check for virtualenv name override
|
||||||
if [[ -f "$PROJECT_ROOT/.venv" ]]; then
|
if [[ -f "$PROJECT_ROOT/.venv" ]]; then
|
||||||
ENV_NAME=`cat "$PROJECT_ROOT/.venv"`
|
ENV_NAME="$(cat "$PROJECT_ROOT/.venv")"
|
||||||
elif [[ -f "$PROJECT_ROOT/.venv/bin/activate" ]];then
|
elif [[ -f "$PROJECT_ROOT/.venv/bin/activate" ]];then
|
||||||
ENV_NAME="$PROJECT_ROOT/.venv"
|
ENV_NAME="$PROJECT_ROOT/.venv"
|
||||||
elif [[ "$PROJECT_ROOT" != "." ]]; then
|
elif [[ "$PROJECT_ROOT" != "." ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user