Some updates
This commit is contained in:
5 files changed
+133
-36
No files matched your search
+8
-4
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user