From 2a67e49d3480e17e032c4ad3e89ab77d9abf82f0 Mon Sep 17 00:00:00 2001 From: Leslie Qi Wang Date: Wed, 28 Feb 2024 20:25:17 -0800 Subject: [PATCH] add stdout as part of error message Signed-off-by: Leslie Qi Wang --- tool.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tool.go b/tool.go index 183fd33..08c3b79 100644 --- a/tool.go +++ b/tool.go @@ -104,11 +104,11 @@ func (t *tool) run(args ...string) (string, error) { err := cmd.Run() if err != nil { - return "", fmt.Errorf("run %s %s: %s (%s)", - cmd.Path, strings.Join(cmd.Args, " "), stderr.String(), err) + return "", fmt.Errorf("run %s %s: stdout(%s), stderr(%s), err(%s)", + cmd.Path, strings.Join(cmd.Args, " "), stdout.String(), stderr.String(), err) } - return stdout.String(), err + return stdout.String(), nil } func requestToBytes(r *Request) []byte {