Skip to content

Commit

Permalink
Merge pull request #2613 from Pinata-Consulting/args-with-spaces
Browse files Browse the repository at this point in the history
scripts: tweak log_cmd to quote args with spaces
  • Loading branch information
maliberty authored Dec 5, 2024
2 parents c7cad99 + 47c0b12 commit 4e29c44
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 4e29c44

Please sign in to comment.