Fixes #29308: Respect VIRTUAL_ENV_DISABLE_PROMPT in Activate.ps1.
This commit is contained in:
parent
b2a5be0763
commit
3ac504289a
|
@ -29,6 +29,7 @@ deactivate -nondestructive
|
||||||
|
|
||||||
$env:VIRTUAL_ENV="__VENV_DIR__"
|
$env:VIRTUAL_ENV="__VENV_DIR__"
|
||||||
|
|
||||||
|
if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
||||||
# Set the prompt to include the env name
|
# Set the prompt to include the env name
|
||||||
# Make sure _OLD_VIRTUAL_PROMPT is global
|
# Make sure _OLD_VIRTUAL_PROMPT is global
|
||||||
function global:_OLD_VIRTUAL_PROMPT {""}
|
function global:_OLD_VIRTUAL_PROMPT {""}
|
||||||
|
@ -37,6 +38,7 @@ function global:prompt {
|
||||||
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
|
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
|
||||||
_OLD_VIRTUAL_PROMPT
|
_OLD_VIRTUAL_PROMPT
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Clear PYTHONHOME
|
# Clear PYTHONHOME
|
||||||
if (Test-Path env:PYTHONHOME) {
|
if (Test-Path env:PYTHONHOME) {
|
||||||
|
|
Loading…
Reference in New Issue