Some updates

This commit is contained in:
Henrique Dias committed 2017-07-12 15:28:35 +01:00
1 parent 476d20606d
commit 45b4ec5a43
5 files changed
+133 -36

No files matched your search

+8 -4
View File
@@ -1,7 +1,7 @@
package hugo
import (
"os"
"errors"
"os/exec"
)
@@ -9,7 +9,11 @@ import (
func Run(command string, args []string, path string) error {
cmd := exec.Command(command, args...)
cmd.Dir = path
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
out, err := cmd.CombinedOutput()
if err != nil {
return errors.New(string(out))
}
return nil
}