Changeset 3908 for trunk/base
- Timestamp:
- Nov 7, 2003, 11:42:03 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port1.0/portutil.tcl
r3882 r3908 1078 1078 } 1079 1079 1080 # check for a binary in the path 1081 # returns an error code if it can not be found 1080 1082 proc binaryInPath {binary} { 1081 1083 global env … … 1086 1088 } 1087 1089 1088 return "";1089 }1090 1091 proc binaryInPath {binary} {1092 global env1093 foreach dir [split $env(PATH) :] {1094 if {[file executable [file join $dir $binary]]} {1095 return [file join $dir $binary]1096 }1097 }1098 1099 1090 return -code error [format [msgcat::mc "Failed to locate '%s' in path: '%s'"] $binary $env(PATH)]; 1100 1091 }
Note: See TracChangeset
for help on using the changeset viewer.