Skip to content

Commit 47c0b12

Browse files
committed
scripts: tweak log_cmd to quote args with spaces
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent c7cad99 commit 47c0b12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flow/scripts/util.tcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
proc log_cmd {cmd args} {
2-
puts "$cmd [join $args " "]"
2+
# log the command, escape arguments with spaces
3+
puts "$cmd [join [lmap arg $args {expr {[string match {* *} $arg] ? "\"$arg\"" : $arg}}] " "]"
34
$cmd {*}$args
45
}
56

0 commit comments

Comments
 (0)