aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2025-03-20 10:02:31 +0100
committerQuim Muntal <quimmuntal@gmail.com>2025-03-20 09:10:13 -0700
commite9558d39476199f05bb08e7e32a2df054c3aab1b (patch)
tree9f6d5fe1ffaa6ed4b34e874f998bbd9f522c13f9 /src/os/exec
parenta4a5ef08bd15201772021620cc3a8331b30643f5 (diff)
downloadgo-e9558d39476199f05bb08e7e32a2df054c3aab1b.tar.xz
all: use exec.Command.String in test logs
There is no need to manually construct a human-friendly string for a exec.Command. The String method does that for us. Change-Id: Iff1033478000bade9cbdc079f6143a7690374258 Reviewed-on: https://go-review.googlesource.com/c/go/+/659475 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/os/exec')
-rw-r--r--src/os/exec/read3.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/os/exec/read3.go b/src/os/exec/read3.go
index 8327d73e51..3ccf1cacc8 100644
--- a/src/os/exec/read3.go
+++ b/src/os/exec/read3.go
@@ -20,7 +20,6 @@ import (
"os/exec"
"os/exec/internal/fdtest"
"runtime"
- "strings"
)
func main() {
@@ -81,7 +80,7 @@ func main() {
cmd := exec.Command(ofcmd, args...)
out, err := cmd.CombinedOutput()
if err != nil {
- fmt.Fprintf(os.Stderr, "%s failed: %v\n", strings.Join(cmd.Args, " "), err)
+ fmt.Fprintf(os.Stderr, "%#q failed: %v\n", cmd, err)
}
fmt.Printf("%s", out)
os.Exit(1)