Revision: 37240 http://trac.macosforge.org/projects/macports/changeset/37240 Author: raimue@macports.org Date: 2008-05-31 13:20:27 -0700 (Sat, 31 May 2008) Log Message: ----------- port/port.tcl: If the 'current' port does not expand to any port, return an error Modified Paths: -------------- trunk/base/src/port/port.tcl Modified: trunk/base/src/port/port.tcl =================================================================== --- trunk/base/src/port/port.tcl 2008-05-31 20:16:31 UTC (rev 37239) +++ trunk/base/src/port/port.tcl 2008-05-31 20:20:27 UTC (rev 37240) @@ -316,6 +316,11 @@ if {[llength $portlist] == 0} { set portlist [get_current_port] + + if {[llength $portlist] == 0} { + # there was no port in current directory + return 1 + } } return 0 @@ -507,6 +512,7 @@ ui_msg "To use the current port, you must be in a port's directory." ui_msg "(you might also see this message if a pseudo-port such as" ui_msg "outdated or installed expands to no ports)." + return [list] } set results {}