From: Volker Dobler Date: Fri, 12 Apr 2013 21:05:14 +0000 (-0700) Subject: cmd/go: quote command line arguments in debug output X-Git-Tag: go1.1rc2~107 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=18ff727487422d73c8dd609d229c3dda7539d9a9;p=gostls13.git 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 --- diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go index 9b90728a72..025b258bf5 100644 --- a/src/cmd/go/build.go +++ b/src/cmd/go/build.go @@ -1306,6 +1306,7 @@ func (b *builder) runOut(dir string, desc string, env []string, cmdargs ...inter // joinUnambiguously prints the slice, quoting where necessary to make the // output unambiguous. +// TODO: See issue 5279. The printing of commands needs a complete redo. func joinUnambiguously(a []string) string { var buf bytes.Buffer for i, s := range a {