summaryrefslogtreecommitdiff
path: root/bootstrap.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap.tcl')
-rw-r--r--bootstrap.tcl10
1 files changed, 7 insertions, 3 deletions
diff --git a/bootstrap.tcl b/bootstrap.tcl
index f6c404f..c93ec9f 100644
--- a/bootstrap.tcl
+++ b/bootstrap.tcl
@@ -1,10 +1,14 @@
# Minimal support for package require
# No error on failure since C extensions aren't handled
-proc package {cmd pkg} {
+proc package {cmd pkg args} {
if {$cmd eq "require"} {
foreach path $::auto_path {
- if {[file exists $path/$pkg.tcl]} {
- uplevel #0 [list source $path/$pkg.tcl]
+ set pkgpath $path/$pkg.tcl
+ if {$path eq "."} {
+ set pkgpath $pkg.tcl
+ }
+ if {[file exists $pkgpath]} {
+ uplevel #0 [list source $pkgpath]
return
}
}