From 03df839448fecb6638255d58989211c36e5784b4 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 12 Mar 2019 11:33:02 +0100 Subject: pkg/osutil: return output with errors from Run Turns out git bisect fails to communicate some outcomes (multiple potential commits), and the only way to understand what happened is parsing plain English output. Extracting the output from the error is quite unhandy. So return it with the error. Update #501 --- pkg/osutil/osutil.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/osutil') diff --git a/pkg/osutil/osutil.go b/pkg/osutil/osutil.go index d8a1cbe84..7061b02d5 100644 --- a/pkg/osutil/osutil.go +++ b/pkg/osutil/osutil.go @@ -59,7 +59,7 @@ func Run(timeout time.Duration, cmd *exec.Cmd) ([]byte, error) { if <-timedout { text = fmt.Sprintf("timedout %q", cmd.Args) } - return nil, &VerboseError{ + return output.Bytes(), &VerboseError{ Title: text, Output: output.Bytes(), } -- cgit mrf-deployment