Skip to content

Commit 18ff727

Browse files
vdoblerrobpike
authored andcommitted
cmd/go: quote command line arguments in debug output
Debug output from go test -x may contain empty arguments. This CL quotes arguments if needed. E.g. the output of go test -x is now .../6g -o ./_go_.6 -p testmain -complete -D "" -I . -I $WORK ./_testmain.go which is easier to grasp. R=golang-dev, bradfitz, minux.ma, r CC=golang-dev https://golang.org/cl/8633043
1 parent ce64f73 commit 18ff727

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cmd/go/build.go

+1
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,7 @@ func (b *builder) runOut(dir string, desc string, env []string, cmdargs ...inter
13061306

13071307
// joinUnambiguously prints the slice, quoting where necessary to make the
13081308
// output unambiguous.
1309+
// TODO: See issue 5279. The printing of commands needs a complete redo.
13091310
func joinUnambiguously(a []string) string {
13101311
var buf bytes.Buffer
13111312
for i, s := range a {

0 commit comments

Comments
 (0)