Skip to content

Commit a736a7f

Browse files
committed
Fix the scope used by log_cmd
uplevel is needed as otherwise the variables set the script are in the scope of log_cmd's proc and not the callers. This problem was hidden by sta's overriding of source but now that it is removed the problem manifests. Signed-off-by: Matt Liberty <[email protected]>
1 parent eec7509 commit a736a7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flow/scripts/util.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ proc log_cmd {cmd args} {
33
set log_cmd "$cmd[join [lmap arg $args {format " %s" [expr {[string match {* *} $arg] ? "\"$arg\"" : "$arg"}]}] ""]"
44
puts $log_cmd
55
set start [clock seconds]
6-
$cmd {*}$args
6+
uplevel 1 [list $cmd {*}$args]
77
set time [expr {[clock seconds] - $start}]
88
if {$time >= 5} {
99
# Ideally we'd use a single line, but the command can output text

0 commit comments

Comments
 (0)