Hugo Updates

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

19
plugins/utils.go Normal file
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
}