Hugo Updates

This commit is contained in:
Henrique Dias committed 2017-07-29 10:14:34 +01:00
1 parent b61a989958
commit b863033d7a
6 files changed
+32 -2474

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package plugins
import (
"errors"
"os/exec"
)
// Run executes an external command
func Run(command string, args []string, path string) error {
cmd := exec.Command(command, args...)
cmd.Dir = path
out, err := cmd.CombinedOutput()
if err != nil {
return errors.New(string(out))
}
return nil
}