Ignore:
Timestamp:
Oct 28, 2003, 8:28:11 PM (15 years ago)
Author:
fkr
Message:

Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:

  • binaryInPath now returns a proper errro code
  • error code is caught in portbuild to properly handle the detection of pbxbuild/xcodebuild
  • not caught in portextract, since then the default handling is sufficient

discussed on irc with jkh@, see patch I sent into darwinports-cvs@

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r3818 r3834  
    10411041    return "";
    10421042}
     1043
     1044proc binaryInPath {binary} {
     1045    global env
     1046    foreach dir [split $env(PATH) :] {
     1047        if {[file executable [file join $dir $binary]]} {
     1048            return [file join $dir $binary]
     1049        }
     1050    }
     1051   
     1052    return -code error [format [msgcat::mc "Failed to locate '%s' in path: '%s'"] $binary $env(PATH)];
     1053}
Note: See TracChangeset for help on using the changeset viewer.