Commit 61fda05b authored by Vinay Sajip's avatar Vinay Sajip

Closes #29308: Merged fix from 3.6.

parents f473fda0 dbb5686e
...@@ -29,13 +29,15 @@ deactivate -nondestructive ...@@ -29,13 +29,15 @@ deactivate -nondestructive
$env:VIRTUAL_ENV="__VENV_DIR__" $env:VIRTUAL_ENV="__VENV_DIR__"
# Set the prompt to include the env name if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) {
# Make sure _OLD_VIRTUAL_PROMPT is global # Set the prompt to include the env name
function global:_OLD_VIRTUAL_PROMPT {""} # Make sure _OLD_VIRTUAL_PROMPT is global
copy-item function:prompt function:_OLD_VIRTUAL_PROMPT function global:_OLD_VIRTUAL_PROMPT {""}
function global:prompt { copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__' function global:prompt {
_OLD_VIRTUAL_PROMPT Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
_OLD_VIRTUAL_PROMPT
}
} }
# Clear PYTHONHOME # Clear PYTHONHOME
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment