forked from pypa/virtualenv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not disable echo for subsequent commands in batch activators (pypa…
- Loading branch information
Paweł Szramowski
committed
Sep 6, 2022
1 parent
d9575ee
commit cf1a3b2
Showing
2 changed files
with
33 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,37 @@ | ||
@echo off | ||
@set "VIRTUAL_ENV=__VIRTUAL_ENV__" | ||
|
||
set "VIRTUAL_ENV=__VIRTUAL_ENV__" | ||
|
||
if defined _OLD_VIRTUAL_PROMPT ( | ||
set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | ||
@if defined _OLD_VIRTUAL_PROMPT ( | ||
@set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | ||
) else ( | ||
if not defined PROMPT ( | ||
set "PROMPT=$P$G" | ||
@if not defined PROMPT ( | ||
@set "PROMPT=$P$G" | ||
) | ||
if not defined VIRTUAL_ENV_DISABLE_PROMPT ( | ||
set "_OLD_VIRTUAL_PROMPT=%PROMPT%" | ||
@if not defined VIRTUAL_ENV_DISABLE_PROMPT ( | ||
@set "_OLD_VIRTUAL_PROMPT=%PROMPT%" | ||
) | ||
) | ||
if not defined VIRTUAL_ENV_DISABLE_PROMPT ( | ||
if "__VIRTUAL_PROMPT__" NEQ "" ( | ||
set "PROMPT=(__VIRTUAL_PROMPT__) %PROMPT%" | ||
@if not defined VIRTUAL_ENV_DISABLE_PROMPT ( | ||
@if "__VIRTUAL_PROMPT__" NEQ "" ( | ||
@set "PROMPT=(__VIRTUAL_PROMPT__) %PROMPT%" | ||
) else ( | ||
for %%d in ("%VIRTUAL_ENV%") do set "PROMPT=(%%~nxd) %PROMPT%" | ||
@for %%d in ("%VIRTUAL_ENV%") do @set "PROMPT=(%%~nxd) %PROMPT%" | ||
) | ||
) | ||
|
||
REM Don't use () to avoid problems with them in %PATH% | ||
if defined _OLD_VIRTUAL_PYTHONHOME goto ENDIFVHOME | ||
set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%" | ||
@REM Don't use () to avoid problems with them in %PATH% | ||
@if defined _OLD_VIRTUAL_PYTHONHOME @goto ENDIFVHOME | ||
@set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%" | ||
:ENDIFVHOME | ||
|
||
set PYTHONHOME= | ||
@set PYTHONHOME= | ||
|
||
REM if defined _OLD_VIRTUAL_PATH ( | ||
if not defined _OLD_VIRTUAL_PATH goto ENDIFVPATH1 | ||
set "PATH=%_OLD_VIRTUAL_PATH%" | ||
@REM if defined _OLD_VIRTUAL_PATH ( | ||
@if not defined _OLD_VIRTUAL_PATH @goto ENDIFVPATH1 | ||
@set "PATH=%_OLD_VIRTUAL_PATH%" | ||
:ENDIFVPATH1 | ||
REM ) else ( | ||
if defined _OLD_VIRTUAL_PATH goto ENDIFVPATH2 | ||
set "_OLD_VIRTUAL_PATH=%PATH%" | ||
@REM ) else ( | ||
@if defined _OLD_VIRTUAL_PATH @goto ENDIFVPATH2 | ||
@set "_OLD_VIRTUAL_PATH=%PATH%" | ||
:ENDIFVPATH2 | ||
|
||
set "PATH=%VIRTUAL_ENV%\__BIN_NAME__;%PATH%" | ||
@set "PATH=%VIRTUAL_ENV%\__BIN_NAME__;%PATH%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
@echo off | ||
@set VIRTUAL_ENV= | ||
|
||
set VIRTUAL_ENV= | ||
|
||
REM Don't use () to avoid problems with them in %PATH% | ||
if not defined _OLD_VIRTUAL_PROMPT goto ENDIFVPROMPT | ||
set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | ||
set _OLD_VIRTUAL_PROMPT= | ||
@REM Don't use () to avoid problems with them in %PATH% | ||
@if not defined _OLD_VIRTUAL_PROMPT @goto ENDIFVPROMPT | ||
@set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | ||
@set _OLD_VIRTUAL_PROMPT= | ||
:ENDIFVPROMPT | ||
|
||
if not defined _OLD_VIRTUAL_PYTHONHOME goto ENDIFVHOME | ||
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" | ||
set _OLD_VIRTUAL_PYTHONHOME= | ||
@if not defined _OLD_VIRTUAL_PYTHONHOME @goto ENDIFVHOME | ||
@set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" | ||
@set _OLD_VIRTUAL_PYTHONHOME= | ||
:ENDIFVHOME | ||
|
||
if not defined _OLD_VIRTUAL_PATH goto ENDIFVPATH | ||
set "PATH=%_OLD_VIRTUAL_PATH%" | ||
set _OLD_VIRTUAL_PATH= | ||
@if not defined _OLD_VIRTUAL_PATH @goto ENDIFVPATH | ||
@set "PATH=%_OLD_VIRTUAL_PATH%" | ||
@set _OLD_VIRTUAL_PATH= | ||
:ENDIFVPATH |