File tree 3 files changed +17
-1
lines changed 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ the parent directory of \fBtcl_library\fR,
31
31
the directories listed in the \fB tcl_pkgPath \fR variable.
32
32
Additional locations to look for files and package indices should
33
33
normally be added to this variable using \fB lappend \fR .
34
+ Initialization of auto_path from the TCLLIBPATH environment
35
+ variable undergoes tilde substitution (see \fB filename \fR ) on each
36
+ path. Any tilde substitution that fails because the user is unknown
37
+ will be omitted from auto_path.
34
38
.RS
35
39
.PP
36
40
Additional variables relating to package management exist. More
Original file line number Diff line number Diff line change @@ -300,6 +300,10 @@ environment variables:
300
300
\fB $::env(TCL8.1_TM_PATH) \fR \fB $::env(TCL8_1_TM_PATH) \fR
301
301
\fB $::env(TCL8.0_TM_PATH) \fR \fB $::env(TCL8_0_TM_PATH) \fR
302
302
.CE
303
+ .PP
304
+ Paths initialized from the environment variables undergo tilde
305
+ substitution (see \fB filename \fR ). Any path whose tilde substitution
306
+ fails because the user is unknown will be omitted from search paths.
303
307
.SH "SEE ALSO"
304
308
package(n), Tcl Improvement Proposal #189
305
309
.QW " \fI Tcl Modules \fR "
Original file line number Diff line number Diff line change @@ -43,7 +43,15 @@ package require -exact tcl 8.7b1
43
43
44
44
if {![info exists auto_path]} {
45
45
if {[info exists env(TCLLIBPATH)] && (![interp issafe])} {
46
- set auto_path $env(TCLLIBPATH)
46
+ set auto_path [apply {{} {
47
+ lmap path $::env(TCLLIBPATH) {
48
+ # Paths relative to unresolvable home dirs are ignored
49
+ if {[catch {file tildeexpand $path } expanded_path]} {
50
+ continue
51
+ }
52
+ set expanded_path
53
+ }
54
+ }}]
47
55
} else {
48
56
set auto_path " "
49
57
}
You can’t perform that action at this time.
0 commit comments