X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fhelper%2Fstartup.tcl;h=a7c0d5844f8523031e0c612d70c9c59ec990364d;hb=ba2fbe22470915359e1905aaad4c613eacbdf6dc;hp=4c71a9a0f66f729e21eb2e34268c53df51a6a8d4;hpb=ea48794210037699bdde44014238c10c9968a72d;p=openocd.git diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index 4c71a9a0f6..a7c0d5844f 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -22,7 +22,8 @@ proc ocd_bouncer {name args} { if {[catch {eval $cmd $args}] == 0} { return "" } else { - set errmsg "Command handler execution failed" + # 'classic' commands output error message as part of progress output + set errmsg "" } } else {if {$type == "group"} { catch {eval ocd_usage $name $args} @@ -52,9 +53,9 @@ proc find {filename} { add_usage_text find "" add_help_text find "print full path to file according to OpenOCD search rules" -# Run script +# Find and run a script proc script {filename} { - source [find $filename] + uplevel #0 [list source [find $filename]] } add_help_text script "filename of OpenOCD script (tcl) to run" add_usage_text script ""