diff --git a/Tcl/portfetch.1.0.tcl b/Tcl/portfetch.1.0.tcl index 0172b40a7..540d42ad1 100755 --- a/Tcl/portfetch.1.0.tcl +++ b/Tcl/portfetch.1.0.tcl @@ -42,9 +42,13 @@ proc portfetch::checkfiles {args} { puts "Attempting to fetch from $site" catch {exec curl -o ${distpath}/${distfile} ${site}${distfile} >&@ stdout} result if {$result == 0} { + set fetched 1 break } } + if {![info exists fetched]} { + return -1 + } } return 0 }