cpython (merge 3.5 -> 3.6): Fixes #29308: Merged fix from 3.5.
https://hg.python.org/cpython/rev/d3890b44159c changeset: 106321:d3890b44159c branch: 3.6 parent: 106318:3275d4b584a2 parent: 106320:91b949dc1984 user: Vinay Sajip <vinay_sajip@yahoo.co.uk> date: Fri Jan 27 12:42:45 2017 +0000 summary: Fixes #29308: Merged fix from 3.5. files: Lib/venv/scripts/nt/Activate.ps1 | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Lib/venv/scripts/nt/Activate.ps1 b/Lib/venv/scripts/nt/Activate.ps1 --- a/Lib/venv/scripts/nt/Activate.ps1 +++ b/Lib/venv/scripts/nt/Activate.ps1 @@ -29,13 +29,15 @@ $env:VIRTUAL_ENV="__VENV_DIR__" -# Set the prompt to include the env name -# Make sure _OLD_VIRTUAL_PROMPT is global -function global:_OLD_VIRTUAL_PROMPT {""} -copy-item function:prompt function:_OLD_VIRTUAL_PROMPT -function global:prompt { - Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__' - _OLD_VIRTUAL_PROMPT +if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) { + # Set the prompt to include the env name + # Make sure _OLD_VIRTUAL_PROMPT is global + function global:_OLD_VIRTUAL_PROMPT {""} + copy-item function:prompt function:_OLD_VIRTUAL_PROMPT + function global:prompt { + Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__' + _OLD_VIRTUAL_PROMPT + } } # Clear PYTHONHOME -- Repository URL: https://hg.python.org/cpython
participants (1)
-
vinay.sajip