diff --git a/here.go b/here.go index 27ace24..1b09c02 100644 --- a/here.go +++ b/here.go @@ -1,6 +1,7 @@ package here import ( + "bytes" "encoding/json" "os" "os/exec" @@ -15,13 +16,15 @@ func newInfo() Info { func run(n string, args ...string) ([]byte, error) { c := exec.Command(n, args...) + bb := &bytes.Buffer{} + c.Stdout = bb c.Stderr = os.Stderr - b, err := c.Output() + err := c.Run() if err != nil { - return b, err + return nil, err } - return b, err + return bb.Bytes(), nil } func setEnv(i *Info) error { diff --git a/version.go b/version.go index 3b5bb89..8bf02de 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package here // Version of here -const Version = "v0.1.2" +const Version = "v0.1.5"