diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-03-12 11:33:02 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-03-17 18:06:44 +0100 |
| commit | 03df839448fecb6638255d58989211c36e5784b4 (patch) | |
| tree | a0e8982b61771a4fc493e3483ab41a0a4feeb3c3 /pkg/osutil | |
| parent | 64745f640c10f478c9c3f647fac594117027db9c (diff) | |
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
Diffstat (limited to 'pkg/osutil')
| -rw-r--r-- | pkg/osutil/osutil.go | 2 |
1 files changed, 1 insertions, 1 deletions
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(), } |
