From 70211f66b02f8f721d8154a6eb6db3f20c6e4fc6 Mon Sep 17 00:00:00 2001 From: Spencer Date: Fri, 20 Jul 2018 14:06:46 -0400 Subject: [PATCH] Updated runner to throw better errors --- runner/runner.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runner/runner.go b/runner/runner.go index 5d62c08..dfb2b8a 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -8,7 +8,6 @@ package runner import ( "bytes" - "errors" "fmt" "os/exec" "path/filepath" @@ -52,7 +51,7 @@ func Run(name string, args ...string) ([]byte, error) { cmd := exec.Command(std.Cmd, parseArgs(name, args...)...) cmd.Stdout, cmd.Stderr = &out, &errs if err := cmd.Run(); err != nil || len(errs.Bytes()) != 0 { - return out.Bytes(), errors.New(errs.String()) + return out.Bytes(), fmt.Errorf("err: \"%s\"\nargs: \"%s\"\nout: \"%s\"", errs.String(), args, out.String()) } return out.Bytes(), nil }