Skip to content

Commit 4e29c44

Browse files
authored
Merge pull request #2613 from Pinata-Consulting/args-with-spaces
scripts: tweak log_cmd to quote args with spaces
2 parents c7cad99 + 47c0b12 commit 4e29c44

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)