@@ -7,6 +7,24 @@ function global:deactivate([switch] $NonDestructive) {
77 Remove-Variable " _OLD_VIRTUAL_PATH" - Scope global
88 }
99
10+ if (Test-Path variable:_OLD_VIRTUAL_TCL_LIBRARY) {
11+ $env: TCL_LIBRARY = $variable: _OLD_VIRTUAL_TCL_LIBRARY
12+ Remove-Variable " _OLD_VIRTUAL_TCL_LIBRARY" - Scope global
13+ } else {
14+ if (Test-Path env:TCL_LIBRARY) {
15+ Remove-Item env:TCL_LIBRARY - ErrorAction SilentlyContinue
16+ }
17+ }
18+
19+ if (Test-Path variable:_OLD_VIRTUAL_TK_LIBRARY) {
20+ $env: TK_LIBRARY = $variable: _OLD_VIRTUAL_TK_LIBRARY
21+ Remove-Variable " _OLD_VIRTUAL_TK_LIBRARY" - Scope global
22+ } else {
23+ if (Test-Path env:TK_LIBRARY) {
24+ Remove-Item env:TK_LIBRARY - ErrorAction SilentlyContinue
25+ }
26+ }
27+
1028 if (Test-Path function:_old_virtual_prompt) {
1129 $function: prompt = $function: _old_virtual_prompt
1230 Remove-Item function:\_old_virtual_prompt
@@ -44,6 +62,20 @@ else {
4462 $env: VIRTUAL_ENV_PROMPT = $ ( Split-Path $env: VIRTUAL_ENV - Leaf )
4563}
4664
65+ if (__TCL_LIBRARY__ -ne " " ) {
66+ if (Test-Path env:TCL_LIBRARY) {
67+ New-Variable - Scope global - Name _OLD_VIRTUAL_TCL_LIBRARY - Value $env: TCL_LIBRARY
68+ }
69+ $env: TCL_LIBRARY = __TCL_LIBRARY__
70+ }
71+
72+ if (__TK_LIBRARY__ -ne " " ) {
73+ if (Test-Path env:TK_LIBRARY) {
74+ New-Variable - Scope global - Name _OLD_VIRTUAL_TK_LIBRARY - Value $env: TK_LIBRARY
75+ }
76+ $env: TK_LIBRARY = __TK_LIBRARY__
77+ }
78+
4779New-Variable - Scope global - Name _OLD_VIRTUAL_PATH - Value $env: PATH
4880
4981$env: PATH = " $env: VIRTUAL_ENV /" + __BIN_NAME__ + __PATH_SEP__ + $env: PATH
0 commit comments