Tcl Source Code

Check-in [6909864f56]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6909864f5655c69cf04acc694643cf0595f2049c
User & Date: dgp 2012-07-25 14:47:03
References
2023-11-06
11:12 Ticket [596936dd2d] auto_execok uses cmd in preference to cmd.exe despite path order (windows) status still Open with 3 other changes artifact: 32ba13684f user: sebres
Context
2012-07-25
15:00
merge 8.5 check-in: c867d5576a user: dgp tags: trunk
14:47
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert. check-in: 6909864f56 user: dgp tags: trunk
14:44
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert. check-in: 1710c3171d user: dgp tags: core-8-5-branch
09:57
[Bug 3547994]: Abandon the synchronous Windows pipe driver to its fate when needed to honour TIP#398... check-in: 9a396c910e user: ferrieux tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to library/init.tcl.

685
686
687
688
689
690
691


692
693
694
695
696
697
698
699
700
701
702
703
704
705

    foreach var {PATH Path path} {
	if {[info exists env($var)]} {
	    append path ";$env($var)"
	}
    }



    foreach dir [split $path {;}] {
	# Skip already checked directories
	if {[info exists checked($dir)] || ($dir eq "")} {
	    continue
	}
	set checked($dir) {}
	foreach ext $execExtensions {
	    set file [file join $dir ${name}${ext}]
	    if {[file exists $file] && ![file isdirectory $file]} {
		return [set auto_execs($name) [list $file]]
	    }
	}
    }
    return ""







>
>
|
|
|
|
|
|
<







685
686
687
688
689
690
691
692
693
694
695
696
697
698
699

700
701
702
703
704
705
706

    foreach var {PATH Path path} {
	if {[info exists env($var)]} {
	    append path ";$env($var)"
	}
    }

    foreach ext $execExtensions {
	unset -nocomplain checked
	foreach dir [split $path {;}] {
	    # Skip already checked directories
	    if {[info exists checked($dir)] || ($dir eq "")} {
		continue
	    }
	    set checked($dir) {}

	    set file [file join $dir ${name}${ext}]
	    if {[file exists $file] && ![file isdirectory $file]} {
		return [set auto_execs($name) [list $file]]
	    }
	}
    }
    return ""