Skip to content

Commit

Permalink
scripts: tweak log_cmd to quote args with spaces
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Harboe <[email protected]>
  • Loading branch information
oharboe committed Dec 4, 2024
1 parent c7cad99 commit 47c0b12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flow/scripts/util.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
proc log_cmd {cmd args} {
puts "$cmd [join $args " "]"
# log the command, escape arguments with spaces
puts "$cmd [join [lmap arg $args {expr {[string match {* *} $arg] ? "\"$arg\"" : $arg}}] " "]"
$cmd {*}$args
}

Expand Down

0 comments on commit 47c0b12

Please sign in to comment.