[3.9] gh-124651: Quote template strings in venv activation scripts (GH-124712) (GH-126185) (GH-126269) (GH-126301)

(cherry picked from commit ae961ae94b)
This commit is contained in:
Victor Stinner 2024-11-04 16:16:35 +01:00 committed by GitHub
parent bbe8756043
commit 633555735a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 130 additions and 16 deletions

View file

@ -37,11 +37,11 @@ deactivate () {
# unset irrelevant variables
deactivate nondestructive
VIRTUAL_ENV="__VENV_DIR__"
VIRTUAL_ENV=__VENV_DIR__
export VIRTUAL_ENV
_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/__VENV_BIN_NAME__:$PATH"
PATH="$VIRTUAL_ENV/"__VENV_BIN_NAME__":$PATH"
export PATH
# unset PYTHONHOME if set
@ -54,7 +54,7 @@ fi
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
_OLD_VIRTUAL_PS1="${PS1:-}"
PS1="__VENV_PROMPT__${PS1:-}"
PS1=__VENV_PROMPT__"${PS1:-}"
export PS1
fi